Question: Write a program that has a main function and a function: fillArray The main function should have the user enter the size of the array

Write a program that has a main function and a function: fillArray The main function should have the user enter the size of the array (n), call fillArray (passing size n), display the array, and free the pointer and memory. fillarray should create and fill a dynamically allocated array of ints of size n with the numbers 1-n and return the pointer to the array back to main. Ch.10 Dynamic Memory Allocation InClass Assignment Part 2.1
- Write a program that has a main function and a function: fillArray
- The main function should have the user enter the size of the array ( n ), call fillArray (passing size n ), display the array, and free the pointer and memory.
- fillarray should create and fill a dynamically allocated array of ints of size n with the numbers 1-n and return the pointer to the array back to main.
Write a program that has a main function and a

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 Programming Questions!