Regarding insertion in the head

sir i am finding it difficult to understand from node*head =NULL; in the main function since it is not clear to me if it is class object or not .and if it is the what is the value of head.data here .i know the basic working of thge function .

is not an object but a pointer to object of class node.
When this is initialized NULL, this means it points nowhere! so head->data will give error!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.