Code is not producing any output

Please help.My code is not producing any output.

Code link:https://ide.codingblocks.com/s/219464

mistakenly, you used root variable instead of temp inside topview function.

updated code: https://ide.codingblocks.com/s/219527
thanks