You are viewing a single comment's thread. Return to all comments →
you need memory space before temp->data = data;
It's my suggestion below: Node *temp = (Node *)malloc(sizeof(Node)); temp->data = data; temp->NULL;
Seems like cookies are disabled on this browser, please enable them to open this website
Insert a Node at the Tail of a Linked List
You are viewing a single comment's thread. Return to all comments →
you need memory space before temp->data = data;
It's my suggestion below: Node *temp = (Node *)malloc(sizeof(Node)); temp->data = data; temp->NULL;