That all depends on the broader context of your program.
If matrix is global (should be avoided), then printMat doesn't really need any arguments.
Line 2: If this is supposed to be a function prototype, the return type must match the implementation: void.
It's better style to pass matrix as an argument.
1 2 3
void printMat (char matrix[][4])
{ // code as in second snippet
}
You can also extend the arguments to pass the dimensions of the matrix. This makes your for loops somewhat more generic.
1 2 3 4 5 6 7 8 9
void printMat (char matrix[][4],int rows, int cols)
{ for (int x = 0; x < rows; x++)
{ for (int y = 0; y < cols; y++)
{ printf("%c", matrix[x][y]);
}
printf("\n");
}
printf("\n");*/
}
However, because this is a 2 dimensional array, the second dimension dimension of the matrix must be specified in the first argument making the print routine somewhat less generic. There are ways around that, but those are beyond the scope of your question.