I am not able to print it correctly.Please check my code once

@gaganpreetsachdev1
This is updated code.

There were some errors in the code. First you were comparing a character to an integer because of which there was an error. Secondly put the conditions for (i > m || j > n) at the top and (maze[i][j] == ‘x’) at the top as they need to be checked for first. Also use memset function to set the values in the matrix.
This line char sol[10][10] = {0} is wrong, because it is a character array, not an integer array.

Also when you check for right and it comes out true, return true at that point because you just want one solution. The same goes for down. Also set sol[i][j] = ‘0’ only after both of them turn out to be false because that is the backtracking step.

If my answer was able to answer your queries,please mark the doubt as resolved.