Question: C++ Create a program that: 1. Asks the user for an array size 2. Dynamically allocates an integer array with the desired number of elements.

C++

Create a program that: 1. Asks the user for an array size 2. Dynamically allocates an integer array with the desired number of elements. a. Youre responsible for cleaning up! 3. Ask the user if they would like to: a. input values b. provide a set of rules for randomly generated values to fill the array c. use the default range for random values i. Random values will be generated with the rand function. See end of chapter 8 slides. 4. Fill the array with respect to the users choice 5. Display the array 6. Sort the array (ascending order) using your method of choice 7. Display the array 8. Ask the user if they wish to return to step 1. The array should be recreated if they return to step 1. --- You MUST define and make use of these functions, among any others that feel appropriate: void mySwap(int * a, int * b);//Switches the contents in a and b //Will fill all entries in the array with a number between min and (min + range) void fillRandom(int * arr, int numEntries, int range = 100, int min = 0) --- If youre unfamiliar with pointers, look to the slides and/or try working on this assignment with a regular array first Also valid, and the same to the compiler on some level: void fillRandom(int [] arr,  ) 

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!