#include #include #include void find_path_in_maze(int,int,char,int); char *maze; int row,col,*trow,*tcol; void main(void) { int obst,i,x,y; char ans; do{ clrscr(); printf("\nEnter the maximum row value : "); scanf("%d",&row); printf("\nEnter the maximum column value : "); scanf("%d",&col); maze=(char*)calloc(row*col,sizeof(char)); trow=(int*)malloc(row*col*sizeof(int)); tcol=(int*)malloc(row*col*sizeof(int)); printf("\nEnter number of obstructions present :"); scanf("%d",&obst); printf("\n\n"); for(i=0;i=row || c<0 || c>=col) //Boundary conditions return; if(r==0 && c==0 && pos!=NULL) //Loop Check return; if(r==(row-1) && c==(col-1) && *(maze + r*col + c)!='b') //Path found { printf("\n\n\n\t\tPath Found...\n\n"); for(int i=0;i