when c->next=merge(a->next,b); takes place recursive function is called.
then the c=b;will take place. how can it be possible that c=a and c=b.
how the value of c->next is assigned to it.
Recursivity of code
since the return value is stored in c->next, the linked list is created, the c in the recursive call is independent of the other c.