Linked list node

why pointer to a node object when passed to a function does not affect its value in main? (whereas a reference pointer is working) pls correct my doubt properly, i had a good understanding of pointers, but after watching first 3 videos… my mind is blank

@sktg99 hey sanchit this is the concept of deep and shallow copy this means if you pass your node without its base address it’s means that this is concept of shallow copy first of all you must idea about actual and formal parameter so what happens in the concept of shallow copy the agruments in actual and formal are different but in the concept of deep copy the base address of node is passed this means that any change occur in formal parameter is also reflect in actual one otherwise link form is not possible

im asking after creating a node pointer, that pointer stores the address of that node, and if we pass that address in function then all the changes will be made in that address so it should reflect changes but its not happening

Can I see you implementation

take this example https://ide.codingblocks.com/s/8695
in most of the function declarations, sir is using node*&head, my question is why (node* head) is not correct.