Having some issues getting the output I desire here. My assignment is to create a function that accepts an array as an argument and creates an array that is twice the size.
The program accepts the array size as input, creates a random array with this size, and then creates a copy with twice as many elements.
I believe I've figured that part out, but I am then supposed to initialize all the additional new elements in the array copy to zero and now I am stuck.
Can anyone point me in the right direction? Any advice, help, guidance would be appreciated. Thank you!
You're going to need to use some dynamic memory here in order to accomplish what is required. expand is not correct. There are no new arrays created here and no elements are copied.