Generally, a preferable way for a function to receive two-dimensional arrays with dimensions not known at compile time is to pass the sizes and use those to define the array:
void 2d_field(size_t Rows, size_t Columns, char field[Rows][Columns])
If you must support C implementation that do not support variable-length arrays, then an alternative is to pass a pointer to the first element of the array:
void 2d_field(size_t Rows, size_t Columns, char *field)
and then use manual calculations to refer to array elements. The element in row r
and column c
is field[r*Columns+c]
.