Home / MCQ Bank / Computer
Computer Structure And Union

Which of the following will stop the loop at the last node of a linked list in the following C code snippet? struct node { struct node *next; };

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • while (p->next != NULL) { p = p->next; }

Related Computer Questions

Bogosort works by ______ Which of the following selects all <div> elements and all <p> elements? What will be the output of the following Java program? import java.util.*; class Collection_iterators { public static void main(String args[]) { LinkedList list = new LinkedList(); list.add(new Integer(2)); list.add(new Integer(8)); list.add(new Integer(5)); list.add(new Integer(1)); Iterator i = list.iterator(); Collections.reverse(list); Collections.sort(list); while(i.hasNext()) System.out.print(i.next() + " "); } } Choose the incorrect statement among the following about the delegate? How can you update data in a database table using SQL?