The correct answer is (A)
Explanation:
1. void join(node *m, node *n){
Here we are sending pointer reference of two node type data. It is a linked list.
2. node *p = n;
Now, new pointer node p defined with its initial value equal to n. So now, p also points to start of n.
3. while (p->next !=NULL){
start of traversal of linked list. If the next pointer of the node is pointing to NULL then stop there.
4. p = p->next;
If p->next is not pointing to NULL i.e. it is not end of the list then update value of p = p->next i.e. now it will be pointing to the next node.
5. }
When the loop ends, the p will be pointing to the last node with p->next = NULL
6. p->next = m;
p->next which was pointing to NULL now will point to m, which the start of next node.
7. }
End of program.
So, list m will append to end of list n.