Question: (a) Answer Question 2(a)(1), (i), (iii) and (iv) based on the following program: #include using namespace std; int main() { int p = 10; int

 (a) Answer Question 2(a)(1), (i), (iii) and (iv) based on the

(a) Answer Question 2(a)(1), (i), (iii) and (iv) based on the following program: #include using namespace std; int main() { int p = 10; int q = 20; int* ptr ; int tmp: ptr -&p; tmp = *ptr; return 0; Figure Q2(a) : Pointer Programming Suppose, the manory addresses of the four variables are as follows: : 0x28feec 9 : 0x28fe8 ptr : 0x28fe4 tmp: 0x28fveo : What are the memory contents of following variables? OP [1 mark] (ii) 4 [1 mark] (iii) ptr (1 mark] (iv) tmp [1 mark]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!