✍️ Get Writing Help
WhatsApp

Code executes

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);

For faster services, inquiry aboutΒ  new assignments submission orΒ  follow ups on your assignments please text us/call us onΒ +1 (251) 265-5102