that of Figure 7.4 (Page 354). After entry into block A in function f. After entry into block B in function int a[10]; g. void g(char *s) main char *s = "hello" char c=s[0]; int x=1 %3D B:{ int a[5]; x = f(x,a); Int f(int i, int b[ ) g(s); { int j=i; return 0;

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
7.2 Draw a possible organization for the runtime environment of the following C program, similar
to that of Figure 7.4 (Page 354).
a. After entry into block A in function f.
b. After entry into block B in function g.
int a[10];
void g(char *s)
main
char *s = "hello"
{
char c=s[0];
{
int x=1
B:{ int a[5];
x = f(x,a);
Int f(int i, int b[ )
g(s);
...
int j=i;
A: { int i=j;
{
return 0;
}
Char c =
...
return 0;
Transcribed Image Text:7.2 Draw a possible organization for the runtime environment of the following C program, similar to that of Figure 7.4 (Page 354). a. After entry into block A in function f. b. After entry into block B in function g. int a[10]; void g(char *s) main char *s = "hello" { char c=s[0]; { int x=1 B:{ int a[5]; x = f(x,a); Int f(int i, int b[ ) g(s); ... int j=i; A: { int i=j; { return 0; } Char c = ... return 0;
X: 15
Y: 10
Globalstatic area
Activation record of
main
u: 15
V: 10
control link
return address
Activation record of
first call to gcd
u: 10
V: 5
- control link
Activation record of
second call to gcd
return address
u: 5
V: 0
Activation record of
control link
return address
third call to gcd
Direction of
stack growth
Transcribed Image Text:X: 15 Y: 10 Globalstatic area Activation record of main u: 15 V: 10 control link return address Activation record of first call to gcd u: 10 V: 5 - control link Activation record of second call to gcd return address u: 5 V: 0 Activation record of control link return address third call to gcd Direction of stack growth
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY