Question: Write a c++ program that creates a dynamic array with n elements, each of which contains its index to the power of 10. In addition
Write a c++ program that creates a dynamic array with n elements, each of which contains its index to the power of 10. In addition to writing a main function, your program should use a function with the following prototype:
int* powersOfTwo (int n);
Note that the function returns a pointer to the dynamically allocated array. This program should create and display the following array. You don't need to print the indexes.

10 100 0 1 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
