Question 12 ( 1 #include 2 #include 3 4 int main() { 5 int *a, *b, *c; 6 7 a = malloc(sizeof(int)); malloc(sizeof(int)); 8 = 9 10 *a = 2; 11 c = b; 12 *c = 9; 13 } 007F 0081 SP 0 FB89 2 FB8B 4 FB8D 007F 0081 с b a

icon
Related questions
Question
Question 12 (
1 #include <stdio.h>
2 #include <stdlib.h>
3
4
int main() {
int *a, *b, *c;
a = malloc(sizeof(int));
malloc(sizeof(int));
b =
*a = 2;
c = b;
*C = 9;
12
13 }
007F
0081
SP 0 FB89
с
2 FB8B
007F
b
4
FB8D
0081
a
Given the program and the memory stack and heap after line 8. What are the
following three values after line 12. All answers will be 4 HEX digits.
MEM[007F]
MEM[0081]
MEM[FB89]
A/
45678SCHIE
9
0123
10
11
A/
A/
Transcribed Image Text:Question 12 ( 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() { int *a, *b, *c; a = malloc(sizeof(int)); malloc(sizeof(int)); b = *a = 2; c = b; *C = 9; 12 13 } 007F 0081 SP 0 FB89 с 2 FB8B 007F b 4 FB8D 0081 a Given the program and the memory stack and heap after line 8. What are the following three values after line 12. All answers will be 4 HEX digits. MEM[007F] MEM[0081] MEM[FB89] A/ 45678SCHIE 9 0123 10 11 A/ A/
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer