Rat in a maze backtracking problem

https://ide.codingblocks.com/s/343731 is giving wrong output

@shrutikatyal take char array input in runtime or take it like this

char maze[10][10]={

                  "0000",

                  "00X0",

                  "000X",

                  "0X00"

                };

and first check if path exist or not and then after make sol[i][j] =0 in your function.