the code seems to work fine but giving a run time error
Run error in the rat maze problem
logic of code is correct
only change you have to do is give complete and proper size to array
char arr[][100];
not correct
this is correct
char arr[100][100];
Modified Code
if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like
: and don’t forgot to mark doubt as resolved 
ohhh that seemed to work for integer array o guess not the same for char array : thanks 