Write a void function that takes a linked list of integers and reverses the
order of its nodes. The function will have one call-by-reference parameter
that is a pointer to the head of the list. After the function is called, this
pointer will point to the head of a linked list that has the same nodes as
the original list, but in the reverse of the order they had in the original list.
Note that your function will neither create nor destroy any nodes. It will
simply rearrange nodes. Place your function in a suitable test program.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.