Recurtion
void rev(Node* head){
if(head==NULL) return;
head=head->next;
rev(head);
cout<<head->data<<endl;}
.
NODE1 -> NODE2->NULL NODE1 NODE2 .
:
Call to rev(NODE1)
Check if it is NULL
Point to next NODE i.e. NODE2
Call to rev(NODE2)
Check if It is NULL
Point to next NODE i.e. NULL
Call to rev(NULL)
Check if It is NULL
Pointer will be returned With head = NULL
, .