merging two sorted linked lists

my code doesnt produce output…
please see where iam doing wrong as iam not so gud in dealing with pointers

@akki16 there are some mistakes in your code.respective mistakes are explained below

  1. you are not storing new_data in your node
  2. you are not pointing to NULL after storing your data.
  3. in merge function you are manipulating with temp3 variable but not with variable c, so c always points to NULL after completion of merge function and at last no need of getchar().

if you take care of these 3 points your code will work. i hope you will understand. any way i am posting slightly modified code here in C