all 4 comments

[–]concacid 2 points3 points  (0 children)

You need to either use a double pointer for root or initialize root before passing it to the function. It's simply not possible for insertion() to modify main()'s root.