Question: C++ assignment help, please provide comments!! 1.Write a code snippet that asks the user to enter how many scores will be input and allocates an
C++ assignment help, please provide comments!!
1.Write a code snippet that asks the user to enter how many scores will be input and allocates an array with the requested capacity. Then ask the user again and allocate a new array using the same variable used for the previous array. What should you do to avoid leaking the memory of the previous array?
2 Write a function named combine that takes two int arrays and their lengths and returns a new array that contains all the elements in arr1 followed by the elements in arr2. Provide client code that calls the function and prints all the elements.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
