Here is some code that operates on a singly linked list. Say P is pointer to a linked list. Linked list node has value and next elements.
S = Q;
S->next = P;
at the end of the code what is the value of P. what is the end result.