Insertion in linked list

not able to find error

hello @divyam_13 i have corrected your insertathead function.
and its printing the correct output.


i hope i have cleared your doubt .
Happy Learning !!

why output is same while passing head node by reference and by copy ?

@divyam_13 i have just corrected your code ,in which it is giving the output as per your input .

hello @divyam_13 if you feel your doubt is cleared please mark this doubt as resolved .
on off the chance if you still have doubt you can reopen the doubt we will help you.
Happy Learning !!

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.