Code:
#include <stdio.h>
#define MAXROW 50
#define MAXCOL 100
main ()
{
int Row_Num, Col_Num;
char Map[MAXROW][MAXCOL];
char Moves[50];
int ctr_Row, ctr_Col;
scanf ("%d %d", &Row_Num, &Col_Num);
if ((Row_Num<=MAXROW)&&(Col_Num<=MAXCOL))
{
printf ("%d %d\n", Row_Num, Col_Num);
for (ctr_Row=0;ctr_Row<Row_Num;ctr_Row++)
for (ctr_Col=0;ctr_Col<Col_Num;ctr_Col++)
scanf ("%c", &Map[ctr_Row][ctr_Col]);
for (ctr_Row=0;ctr_Row<Row_Num;ctr_Row++)
for (ctr_Col=0;ctr_Col<Col_Num;ctr_Col++)
printf ("%c", Map[ctr_Row][ctr_Col]);
printf ("\n");
printf ("%d %d", ctr_Row, ctr_Col);
}
return 0;
}