-
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;
};
-
-
while (p->next != NULL)
{
p = p->next;
} -
while (1)
{
p = p->next;
if (p == NULL)
break;
} -
while (p != NULL)
{
p = p->next;
} - All of above
- None of these
-
Correct Option: A
None of these