Lab 2:
Instructions
Create a function/method that will increase the size of an array by 2 (double the size). The function/method must return a pointer to the new array. Main will create the initial array and pass it to the function/method. The pointer in main will point to the array with the new size. No data should be lost from the array passed in and all the new locations should be set to zero.

Download Source Lab 2 File:

Downloaded file:

include

using namespace std;

int* ExpandArray(int data[], int size)
{

}

int main()
{
int size = 2;
int* values = new int[size];
values[0] = 55;
values[1] = 77;

for (int index = 0; index

Sample Solution

This question has been answered.

Get Answer