Question: Given the following program: 1 int h , i; 2 void B ( int w ) { 3 int j , k; 4 i =

Given the following program:
1 int h, i;
2 void B(int w){
3 int j, k;
4 i =2* w;
5 w = w +1;
6...
7}
8 void A(int x, int y){
9 float i, j;
10 B(h);
11 i =3;
12...
13}
14 void main(){
15 int a, b;
16 h =5; a =3; b =2;
17 A(a, b);
18 B(h);
19...
20}
a. Assume dynamic scoping and a call history of: main(line 17)-> A(line 10)-> B. For each function
list all of the variables referenced and the line on which it was declared

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 Programming Questions!