What is wrong with the following code?
int *p; //Line 1int *q; //Line 2p = new int [5]; //Line 3*p = 2; //Line 4for (int i = 1; i<5; i++) //Line 5p[i] = p[i-1] + i; //Line 6q = p; //Line 7delete [ ] p; //Line 8for (int j = 0; j<5; j++) //Line 9cout « q[j] « ” //Line 10cout « end1; //Line 11
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.