What is the output of the following code? (2, 3, 6)
int *myPtr = new int;
int *yourPtr;
*myPtr = 15;
yourPtr = new int;
delete myPtr;
myPtr = yourPtr;
*yourPtr = 28;
myPtr = new int;
*myPtr = 49;
*yourPtr = 34;
delete yourPtr;
yourPtr = myPtr;
myPtr = new int;
*myPtr = 54;
cout < *myptr=””>< “=”” “=””>< *yourptr=””><>
What is stored in numList after the following code executes? (8)
int numList[6] = 25, 37, 62, 78, 92, 13;
int *listPtr = numList;
int *temp = listPtr + 2;
int num;
*listPtr = *(listPtr + 1) – *listPtr;
listPtr++; num = *temp; temp++;
listPtr++;
*listPtr = *temp;
*temp = num;
listPtr = listPtr + 2;
*listPtr = *(listPtr – 1);