Question: Please help and make it easy to understand this needs to be done in C++ Instructions: One of the useful things about dynamic memory is

Please help and make it easy to understand this needs to be done in C++  Please help and make it easy to understand this needs to
be done in C++ Instructions: One of the useful things about dynamic

Instructions: One of the useful things about dynamic memory is that you can essentially change the size of a dynamically created array (make a bigger one, copy values, change pointer, etc.) For this lab, you will use the program given to you (lab4.cpp) and finish it by writing the definition of the addSize function called on line 25. o Prototype on top, definition on bottom o Don't forget about deallocating, if necessary (probably) You will also add code to main that adds values to the new spaces that were added o See the comment on line 28 You don't have to change anything else in main() Make sure you have the correct comments on top. 1/ Complete the program given by writing the definition of the 'addSize' function 1/ (it is being called in line 25) // Also, add code to fill in the extra space created in the array 11 before it is displayed at the end #include using namespace std; //function prototype goes here int main() { int SIZE = 10, currentSize; int *arrPtr = new int[SIZE]; for (int i = 0; i //function definition goes here

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!