Binary tree program not running properly

so i was trying to make a binary tree program. just inserting and deleteing. some how i messed up. i think insertion is ok till level 1 after that stays on level 1 only.

also the function to delete the whole tree is not working.
it only deletes node at level 0 only.
first i thought that assigning the value to pointer as 0 will make it null pointer but i was not able to comapre it with 0. it was having some other value that compiler assigned it.

k i think i figured it out. during insertion of new node. the pionter that i am passing are call by value so all the changes i am making are in other pointer and not the pointer i am passing. how can i pass a pointer by refrence. its sound too strange to even write this.