CPE 212 Sample Exam II What output is generated for each statement numbered Prob
ID: 3717781 • Letter: C
Question
CPE 212 Sample Exam II
What output is generated for each statement numbered Problems 21 - 30 below // Assume all values including memory addresses are output in decimal notation. #include using namespace std; void DoSomething (int& r, int* s) s [2] = r - s[1]; int main () int x = 1; int y - 2; int z[3] -3, 4, 5); int *a - &x; int* b &z;[0]; // Assume the variable x is st red at location 1400 // Assume the variable y is stored at location 1300 // Assume base address of array z is location 1200 // Assume the variable a is stored at location 1100 // Assume the variable b is stored at location 1000 coutExplanation / Answer
Answer :
21) 2
22) 1100
23) 2
24) 1000
25) 1100
26) 3
27) 1200
28) 1000
29) 5
30) 1