Actually i am confused how a pointer is passed

void buildList(node*&head)
why we are using operator pointers are passed by refrence

It is beacuse we want to change the original value of the head. We use pass by value when we want to work on the copy whereas we use reference when we want to work on the original values.

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.