Interview Questions

Software development engineer in test - What does following code do ....

Software Design Engineers in Test SDET FAQ


(Continued from previous question...)

15. Software development engineer in test - What does following code do ....

Question:
What does following code do , if we pass head pointer of a link list.
void list( struct node * head)
{
if(head)
{
list(head->next);
printf("%d",head->value);
}
}


Answer: prints link list in reverse order.

(Continued on next question...)

Other Interview Questions