Consider the following Linked list Node structure
struct Node
{
int data;
struct Node * next;
}
typedef struct Node Node;
Consider the following function to reverse the singly linked list
Node* reverse_list(Node *head)
{
Node *temp = NULL;
Node *next ;
while(head)
{
next = 1)------;
head->next = temp;
temp = head;
head = 2)-------;
}
return temp;
}
What are the missing expressions at 1 and 2 respectively
(A) head, head->next
(B) head->next,head
(C) NULL, head->next
(D) head->next, next