subject

Consider the following program:

void fun1(void); /* prototype */
void fun2(void); /* prototype */
void fun3(void); /* prototype */
void main() {
int a, b, c;
...
}
void fun1(void) {
int b, c, d;
...
}
void fun2(void) {
int c, d, e;
...
}
void fun3(void) {
int d, e, f;
...
}

Given the following calling sequences and assuming that dynamic scoping is used, what variables are visible during the execution of the last subprogram activated? Include with each visible variable the name of the unit where it is declared.
1. main calls sub1; sub1 calls sub2; sub2 calls sub3.
2. main calls sub1; sub1 calls sub3.
3. main calls sub2; sub2 calls sub3; sub3 calls sub1.
4. main calls sub3; sub3 calls sub1.
5. main calls sub1; sub1 calls sub3; sub3 calls sub2.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:00, hctlawton
Which software would you use to create a print design? a. illustrator b. audacity c. reaper d. dreamweaver
Answers: 2
image
Computers and Technology, 24.06.2019 00:30, louie8656
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
image
Computers and Technology, 24.06.2019 20:30, lowwlifelivv
Where is permanent data in the computer stored whenever gym starts his laptop he sees some commands in numbers appearing on the screen these instructions are being preceded by the control unit in
Answers: 1
image
Computers and Technology, 25.06.2019 04:00, anthonypacheco
What was the name of the first computer (machine) language?
Answers: 2
You know the right answer?
Consider the following program:

void fun1(void); /* prototype */
void fun2(void)...

Questions in other subjects:

Konu
Physics, 15.10.2019 12:10