Linked list 02 insertion 1 lec

If we pass the value by referece in main of head of the linked list by declaring the function like this is it also correct
Insertathead(struct Node *p) this is also a way of passing by value if we provide the address in function call?

yes

yes it will make changes in address hence changes also reflect in main
but the pointer value (value of p) will not updated in main()

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.

But if i pass address then it should change the value of p in main also

if you pass the address of p then yes it will also update in main()
for that you have to make double pointer(pointer that stores the address of another pointer)
more about double pointer