what is the significance and meaning of line of code
head=head->next;
Not understanding line of code
head->next also can be written as *(head).next.
It means that head->next stores the address of the next node. So when we do head=head->next
it basically means that we are now copying next node’s address into our head variable so that we can access it .
Its like i=i+1 just like here you want to go to next i u do i=i+1 similar is the case with nodes. we are just updating the head with next node so as to move forward.