What is the output of the following code?
int *p;int *q;p = new int [5];p[0] = 5;for (int i = 1; i<5; i++)p[i] = p[i − 1] + 2 * i;cout ≪ “Array p:”;for (int i = 0; i<5; i++)cout ≪ p[i] ≪ " ";cout ≪ end1;q = new int[5];for (int i = 0; i<5; i++)q[i] = p[4 − i];cout ≪ “Array q: ”;for (int i = 0; i<5; i++)cout ≪ q[i] ≪ " ";cout ≪ end1;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.