Question: Using C++: Write a program that has a main function and a function: fillArray The main functin should have the user enter the size of

Using C++:

Write a program that has a main function and a function: fillArray

The main functin should have the user enter the size of the array(n), call fillArray(passing size n), display the array, and free the pointer and the 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.

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!