data); } fun1() prints the given Linked List in revers..." /> Do You Know What Does The Following Function Do For A Given Linked List? data); } fun1() prints the given Linked List in revers..." /> data); } fun1() prints the given Linked List in revers..." />
Answers

Question and Answer:

  Home  Linked list

⟩ Do you know what does the following function do for a given Linked List?

void fun1(struct node* head)

{

if(head == NULL)

return;

fun1(head->next);

printf("%d ", head->data);

}

fun1() prints the given Linked List in reverse manner. For Linked List 1->2->3->4->5, fun1() prints 5->4->3->2->1.

 145 views

More Questions for you: