Question: QUESTION 4 [20 MARKSI Given a code as in Figure 5 with the corresponding memory map in Figure 6. = 1. #include 2. #include 3.

 QUESTION 4 [20 MARKSI Given a code as in Figure 5

QUESTION 4 [20 MARKSI Given a code as in Figure 5 with the corresponding memory map in Figure 6. = 1. #include 2. #include 3. 4. int main (void) { 5. int a, b, c = 10, d = 11, e = 12; 6. b= &c; 7. printf("%p%p ", &c, &d); 8. printf("%p%d ", b, *b); 9. b=b-1; 10. printf("%p %d", b, *b); 11. return ; 12. } Figure 5: Code depicting usage of pointers 0 1 2 3 4 5 6 7 9 A D E F 11 10 0065FDEO 0065FDFO 0065F800 0065FE10 0065FE20 0065FE30 0065FE41 00 65 FE 08 12 Figure 6: Simplified memory map (a) (b) (c) (d) List down the address for variables b, c, d, and e. Based on Figure 5. solve for the output expected in line 7. Based on Figure 5, solve for the output expected in line 8. Based on Figure 5. solve for the output expected in line 10. [5 Marks) [5 Marks) [5 Marks) [5 Marks)

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!