Question: C++ ONLY PLEASE Exercise 3: Increase Array Size Once an array is created, its size is fixed. Sometimes, you need to add more yalues to

C++ ONLY PLEASE

C++ ONLY PLEASE Exercise 3: Increase Array Size Once an array is

Exercise 3: Increase Array Size Once an array is created, its size is fixed. Sometimes, you need to add more yalues to an array than it is able to hold; in this case, you may create a new larger array to replace the existing array. Write a function that returns a pointer to a new int array that is double the size of the array passed in the parameters to this function. Use the following header: int double capacity Write a test program that prompts the user to enter the number of elements of an array, and then to double the capacity of the array and prompt the user for more values. Finally, the program will const int list, int size) display all the elements of the array. Note: make sure to delete the old array, since it isn't likely to be used after the function creates and returns the new, bigger 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!