Interviewer And Interviewee Guide

Data Structure Linked list Interview Question:

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

Submitted by: Muhammad
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.
Submitted by: Muhammad

Read Online Data Structure Linked list Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.