Inverse a number

how to inverse a number?
https://hack.codingblocks.com/contests/c/474/182

what is wrong with this code.it is not giving any output.mycompare function is not working.
https://ide.codingblocks.com/#/s/24060

You can check my code:
https://ide.codingblocks.com/#/s/24265