1.

The following function reverse() is supposed to reverse a singly linked list. There is one line missing at the end of the function.What should be added in place of “/*ADD A STATEMENT HERE*/”, so that the function correctly reverses a linked list.

A. *head_ref = prev;
B. *head_ref = current;
C. *head_ref = next;
D. *head_ref = NULL;
Answer» B. *head_ref = current;


Discussion

No Comment Found