A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. What is the output of following function for start pointing to first node of following linked list?
1->2->3->4->5->6

void fun(struct node* start)
{
  if(start == NULL)
    return;
  printf("%d  ", start->data);
  
  if(start->next != NULL )
    fun(start->next->next);
  printf("%d  ", start->data);
}
a. 1 4 6 6 4 1
b. 1 3 5 1 3 5
c. 1 2 3 5
d. 1 3 5 5 3 1
Answer:1 3 5 5 3 1

Similar Questions:



View All Questions on: Linked Lists


Start The Conversation: