Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Print the list in reverse order (http://www.go4expert.com/forums/print-list-reverse-t6387/)

sandesh 17Sep2007 14:11

Print the list in reverse order
 
Hi.............
we can reverse print the link list without changing the list
we use recursion for this purpose ...............
code is like..........

Code:

void printreverse(node *head)
{
        if(head)
        {
                printfreverse(head->next);
                printf("  -> %d",head->data);
        }
}

if anyone of you have any query on queue ,stack and link list then we can discussion on that topics............


All times are GMT +5.5. The time now is 00:09.