Question: C PROGRAM the functions create and free a dynamically allocated 2D array. It should function like a statically allocated array (use malloc()) int **createArray(int rows,
C PROGRAM
the functions create and free a dynamically allocated 2D array. It should function like a statically allocated array (use malloc())
int **createArray(int rows, int cols)
parameters to this function are the number of rows and cols in the array. The return value is the array that you have dynamically allocated
void freeArray (int **array, int rows, int cols)
the parameters to this function are:
-the array created by createArray()
-the number of rows in the array
-the number of cols in the array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
