Question: What does the following functions do? int mystry(struct node* head) { int count - 0 struct node*current - head; while (current != NULL) { count++

What does the following functions do? int mystry(struct node* head) { int count - 0 struct node*current - head; while (current != NULL) { count++ current = current->next return (count); struct node* mystry (struct node* head) { struct node* a - head; struct node* bNULL; struct node* tail-NULL while (a != NULL) { if (b == NULL) { b = malloc ( sizeof ( struct b->data = a->data; b-> next NULL ; tail = b; node ) ) ; } else t tail->next = malloc ( sizeof ( struct node ) ) ; tail - tail->next; tail->data = a->data; tail->next = NULL ; a a->next; = } return(b)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
