TAKING INPUT FOR TWO DIFFERENT LINKED LIST


I am a little confused while taking input for two different linked lists.
Merge function is correct but I guess there’s some error in insert or input function due to which it is running infinitely.
Please help.

Hey @mverma_be19
There is only one correction in your code
Move line 13(struct node*head=NULL;)
inside take_input() function.
Otherwise head for both the linked list is same.