Question: What does the following function do? struct node { }; int data; struct node* next; static void r(struct node** head_ref) { } struct node*
What does the following function do? struct node { }; int data; struct node* next; static void r(struct node** head_ref) { } struct node* prev = NULL; struct node* current = *head_ref; struct node* next; while (current != NULL) { } next = current->next; current->next = prev: prev = current; current = next; *head_ref=prev:
Step by Step Solution
There are 3 Steps involved in it
The given function r appears to be a function that reverses a linked list Heres what the function do... View full answer
Get step-by-step solutions from verified subject matter experts
