Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions