This is what your code should look like.
Code:
#include<stdio.h>
#include<conio.h>
#include<time.h>
int main ()
{
char maze[12][12];
int x,y,a,b,c;
char question;
srand((unsigned) time (NULL));
printf("******************************************\n"
"Welcome to the maze game !\t\t *\n"
"Please note the keys to play the game\t *\n"
"UP\tDOWN\tRIGHT\tLEFT\t\t *\n"
"[i]\t[m]\t[h]\t[l]\t\t *\n"
"******************************************");
printf("\n\n");
do
{
for(a=0;a<12;a++)
{
maze[0][a]='#';
maze[11][a]='#';
}
for(b=0;b<12;b++)
{
maze[b][0]='#';
maze[b][11]='#';
}
for (x=1;x<=10;x++)
for (y=1;y<=10;y++)
{
c=rand()%10;
if(c>1 && c<6 )
maze[x][y]='#';
else
maze[x][y]='.';
}
for (x=0;x<12;x++)
{
printf("\n");
for (y=0;y<12;y++)
{
printf("%c",maze[x][y]);
}
}
printf("\n Press [c] to continue : ");
fflush(stdin);
scanf("%c",&question);
}while( question == 'c');
printf("\n");
printf("\n");
return 0;
}
Notice how things like braces line up, and all code at the same functional level is indented to the same level.
Other problems
1. You generate a new maze every time around the loop. You need to think about generating a maze just once, then entering another loop to let the user "walk" around the maze (and update the screen accordingly).
2. Your random placement of # in the interior doesn't guarantee a solvable maze.
There are some additional descriptions in your graphic which describes how to check for a valid maze. You need an isValidMaze function.
Starter...
Code:
void constructMaze ( char maze[12][12] ) {
}
int main ( ) {
char maze[12][12];
constructMaze( maze );
}