What does the operator new do? (6)
What does the operator delete do? (6)
Assume that the input is: 10 70 20 40 60. What is the output of the following code? (8)
int *intList;
intList = new int[5];
for (int i = 0; i < 5;=””>
cin >> intList[i];
for (int i = 4; i > 0; i–)
intList[i] = intList[i] + intList[i – 1];
int sum = 0; for (int i = 0; i < 5;=”” i++)=””>
cout < intlist[i]=””>< “=””>
sum = sum 1 intList[i];
cout < endl=””>
“sum=””>
>