Question: Consider the following program. program main int x , y ; proc A; int z ; proc B; call C ; print x ; x
Consider the following program.
program main
int ;
proc A;
int ;
proc B;
call ; print ;:; end
proc C;
int ;
; call ; print ; end
call ; print ; end
proc D;
int ;
proc E;
int ;
proc ;
end
call F; print ;:; end
call E; print ; end
call ; print ; end main
a List the referencing environment visible variables in proc if static scoping is used.
b List the referencing environment visible variables in proc D if dynamic scoping is
used.
Note: main calls A calls B calls C calls D calls E calls F
c List the units that can be called by proc E if static scoping is used.
d Give the program output if static scoping is used.
e Give the program output if dynamic scoping is used.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
