Please help my to find the bug!

https://ide.codingblocks.com/s/312614. What’ the problem with my code

@aryan
your else loop for find function(int type) returns nothing .correct that