1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Print the list in reverse order

Discussion in 'C' started by sandesh, Sep 17, 2007.

  1. sandesh

    sandesh New Member

    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............
     
    Last edited by a moderator: Sep 17, 2007

Share This Page