I like to do it this way :
int n = 4;
char matrixA[n][n];
int i,j;
for(i = 0;i < n ;i++){
for(j = 0;j < n;j++){
fflush(stdin);
matrixA[i][j] = getche();
printf(" ");
}
printf("\n");
}
**Note that,you won't have to hit return after typing the character when you'll input.And the input will be row by row and with spaces between the characters.So,It'll give you a clear idea which value is going to which position of the matrix.