Rat chases its cheese problem (Backtracking)

Help me identify the mistake in the code.
Code: https://ide.codingblocks.com/s/576573

When a path does not exist, you have to display “NO PATH FOUND”. It is mentioned in the question. The rat can move in all 4 directions, so it is possible that it might visit a cell again and get stuck in recursion. So before making recursive calls, we have to check if the cell is already visited or not.
I made the required changes to your code: https://ide.codingblocks.com/s/576597
Check it.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.