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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!