output not coming
Https://ide.codingblocks.com/s/147503
Kartik plz make few changes in your code, firstly you are not asked to write anywhere, enter data or enter no of nodes,
Secondly, the basic approach you have to follow up is that,
you have to take 2 nodes heads as,
node *head1=NULL;
node *head2=NULL;
buildlist(head1);
buildlist(head2);
head1=merge(head1,head2);
print(head1);
Make separate functions for each of these and then implement your code,