Insert a Node at the Tail of a Linked List

  • + 0 comments

    how am i getting error???plz explainNode* Insert(Node *head,int data { Node n = (node)malloc(sizeof(node)); n->data=data; n->next=NULL; if(head==NULL) { return head=n; } else { Node *rhead = head; while(head->next!=NULL) { head=head->next; } head->next =n; return rhead; } }