LInked list insertion at tail


why there is no output? i am inserting data at the tail

Hi @nirupama1
Few changes you have to make in your code :

  1. Initialise node *head=NULL; in int main( )
  2. In the insert function in else case you have to check till temp->next ! = NULL and then do temp->next = n;

Here is your corrected code :