What Does The Following Function Do For A Given Linked List #62
What does the following function do for a given Linked List with first node as head?</p> <pre><code class="language-java"> void fun1(struct node* head) { if(head == NULL) return; fun1(head->next); printf("%d ", head->data); } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs121 Data Structures and Algorithms. It can also be found in gs gs121 Abstract Data Types - Singly Linked Lists Operations – 2 - Quiz No.1.
What does the following function do for a given Linked List with first node as head?
void fun1(struct node* head) { if(head == NULL) return; fun1(head->next); printf("%d ", head->data); }
Prints all nodes of linked lists
Prints all nodes of linked list in reverse order
Prints alternate nodes of Linked List
Prints alternate nodes in reverse order
Similar question(s) are as followings:
Online Quizzes of gs121 Data Structures and Algorithms
Binary Trees - Binary Search Tree - Quiz No.1
gs gs121 Data Structures and Algorithms
Online Quizzes
Binary Trees - Binary Search Tree - Quiz No.2
gs gs121 Data Structures and Algorithms
Online Quizzes
Binary Trees - Preorder Traversal - Quiz No.1
gs gs121 Data Structures and Algorithms
Online Quizzes