Print All

void Print1(Node *head)
{
    if (head == NULL)
        return;
    else {
        printf("%d ", head->data);
        Print1(head->next);
    }
}
 
void Print2(Node *head)
{
    while (head != NULL) {
        printf("%d ", head->data);
        head = head->next;
    }
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License