How to write functions which accept two-dimensional arrays when the width is not known before hand?
Try something like
myfunc(&myarray[0][0], NO_OF_ROWS, NO_OF_COLUMNS);
void myfunc(int *array_pointer, int no_of_rows, int no_of_columns)
{
// myarray[i][j] is accessed as array_pointer[i * no_of_columns + j]
}