Given the following program with errors. Rewrite the program to store the power of the array's index and print the value
Posted: Fri Jul 01, 2022 5:52 am
Given the following program with errors. Rewrite the program to store the power of the array's index and print the value. int main() { const int SIZE = 25; int *arrayptr; arrayptr = new double[SIZE]; for (int i = 0; i < SIZE; i++) *arrayptr = i* i; for (int i = 0; i < SIZE; i++) cout <<*arrayptr + i<<endl; return 0; } value