What is wrong with this code?

I am trying this question to find out median of two sorted arrays of equal size. I have written the code but it is giving me wrong answer…please let me know what is wrong with my code?
link to code-> https://ide.codingblocks.com/s/623047
link to question->https://www.geeksforgeeks.org/median-of-two-sorted-arrays/