Reference no: EM132209663
Write a program that creates a pointer to a dynamic array of integers of size 10. The program will load the array with values from 1 to 10 then:
Using the following functions:
A function that accepts the pointer to the integer array and the array size as a arguments, creates a pointer to a new copy of the array, except the values will be reversed in the copy. The function should return the pointer to the new array.
A function that accepts the integer array, and the array size as an argument. The function should create a new array that is twice the size of the original array. It should copy the original array information in and then initialize the unused elements to 0. It should return a pointer to the new array.
A function that accepts the integer array, and the array size as an argument. The function should create a new vector object that is twice the size of the original array. It should copy only the even values of the original array information into the new vector and then initialize the unused elements to 0. It should return a pointer to the new vector.
A function that accepts the integer array and the array size as a arguments. It should print the array's data with spaces between the numbers
Any other function you need.
In main,
print the array
call the reverse function,
print the reversed array,
call the doubling function
print the doubled array
call the vector creator function
print the vector.
Print a header before each array print to know what it is doing.