To allocate a 2D array of integers, in such a way that the array elements can be accessed with a[i][j] syntax i.e., should not use pointers to access the values.

Note: The function should perform only a single malloc call.

The function declaration is:

int **alloc_array( int nrows, int ncols);