Rat in a maze backtracking

can you check where the problem is

Modified Code

you have to print the solution at base case
otherwise in backtrack all become zero