Question: Modify your main.c file so that it allocates a two dimentional array of integers so that the array has 20 rows of 30 integers in

 Modify your main.c file so that it allocates a two dimentional

Modify your main.c file so that it allocates a two dimentional array of integers so that the array has 20 rows of 30 integers in each row. Fill up the entire array so that the first row contains 0-29 the second row contains 1-30, the third row contains 2-31 and so on until the last row contains 19-48. Print the results in a grid so that your output looks like:

array of integers so that the array has 20 rows of 30

#include #include int main(int argc, chark argv[]) int *pi //Declaration of a pointer variable. p = (int**) malloc( sizeof (int*)#20). //First "bookend" allocates space printf ("Hello world! I have created a dynamic array of 100 integers!Nn") printf("Hello world! I have created a dynamic 2D-array of 20x30 integers IAn") IIfree(p): I/Second "bookend" cleans up the space return return

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!