Merge sort in linked list

now sir is creating two nodes inside the function which are nodea and nodeb and then merging it, these two nodes are created inside the function, and then a node c is returned which is the pointer to head node of sorted linked list, now my question is How is it possible to get back the complete linked list after creating it in the function call, also once we return something from the function, other variables created are destroyed, so how pointers are retrieved back in this case,let me know in case, i can explain my doubt again if u dont get it now

Hello @sktg99,

As i have cleared doubt on WhatsApp, you may mark it as resolved.