Struct void find(Struct node ** head)
{
Struct node *X=*head;
Struct node *Y;
Struct node *Z=NULL;
While(X!=NULL)
{
Y=X->next;
X->next=Z;
Z=X;
X=Y;
}
*head=Z;
}
If head is a pointer to a pointer to the first node of the list and it is passed to the ‘find’ function then find the list after executing the function.
1
It adds a new node at the first
2
It adds a new node at the last
3
It keeps the list as same
4
It reverses the list