4. Trace the output. void calculate (int& a, int& b, int& c) ( b+= 2; b-= 1; } int main() 1 int one = 3, two = 5, three
Posted: Fri Jul 01, 2022 5:33 am
4. Trace the output. void calculate (int& a, int& b, int& c) ( b+= 2; b-= 1; } int main() 1 int one = 3, two = 5, three =4; calculate (one, two, three); cout << "one = " << one << ", two = " << two <<", three = " << three; return 0; } 5. Given the following program with errors. Rewrite the program to store the power value 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;