Rat in maze path printing

code : https://ide.codingblocks.com/s/227858

my output is showing wrong… in this case


there was a minor issue in the first line of rec call
u had written i==m || i==n
it should be i==m && j==n i.e. both at the last row and col resp

yeaah thank you

one more doubt if you see my input array i have passed the bottom most element as X
which is not valid path… then how still it is showing output
0000",“00X0”,“000X”, “0X0X”,

here i am talking about last X

it should return not found?

because as soon as the counters reach to the last value of the matrix, it gets printed, the control does not go to the next checking statement
this is a base case, u will have to put a separate check for this case

yeaah i got it thanks

if your doubt is solved, please mark it as resolved