[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.
Interview Questions and Answers :: Broadcom Ltd

8. Write a program to print the Linklist element in reverse order by recursion.

Answer:

void recLinkedList(struct node *head)
{
struct node *tmp = head->next;

if ( tmp != NULL)
recLinkedList(tmp);

printf("\r\n [%d] \r\n", tmp->data);

}

Post Your Answer Here:      Public      Private

Rate This: +1 -0
Report     

Post Your Reply Here:     

Report Error

Report Error

Please Login First Click Here