How to merge two sorted singly linked list

here we will discuss ,how to merge two sorted linked list such that the final list is sorted in ascending order the structure ( node ) definition is given below: typedef struct node{ int val; struct node* next; }* node; Explanation: we will insert (merge ) the elements of list 2 (f2) in f1 by comparing each nodes value. ALGORITHM: traverse both lists till one of them is completely traversed compare the values of node and if the value of node of list f1 is smaller then move to next node of f1 and increment the value of pos. the pos variable will be used after complete traversal to join the remaining elements of f2 if any. and if f2 nodes value is smaller then insert it before the current node in f1 and set f1 to previous node that is the node of f2 and increment f2 to next node. after completely traversing one of the lists , append the remaining elements of f2 if any in f1 . void merge_ll(node *first){ delete_ll(*first);*first=NULL; int pos=0; printf("