Passing head by refrence in order to cal. length function

while finding length of linked list ,in function when head passed by refrence gives no output why??

if you pass head by reference
then after the length function head will at end means head==NULL
that why it will not give any output

i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning:
if you have more doubts regarding this feel free to ask