in the argument for all the input function eg buildlist why do we use pointer reference while in all the output function eg printlist we use copy of pointer
Operator overloading
When we are changing the linked list doing some modification (adding, deleting, re arranging) and we want the changes to be reflected back, we use pointer reference (if we pass pointer the we must return a value that would be used to update the head in main function) (if are not returning the value neither we are using reference pointer then our main head will not be updated so in this case it might happen our head remains null), when we are just traversing the list or do not want the changes made in a functions to effect the main list we pass the simple pointer.
Its very similar to the thing we do to simple variables, we pass them by reference if we want changes to be reflected back else we pass them by value.
@radhika1995 if this solves your doubt mark it as resolved.