Question: 2 . What is the output of following program using both Static and Dynamic scoping? begin integer x , y; function sub 1 ; begin
What is the output of following program using both Static and Dynamic scoping?
begin
integer x y;
function sub;
begin
print y in sub y;
end;
function suby: integer;
begin
print x in sub x;
print y in sub y;
sub;
end;
sub;
x: ;
y: ;
print y in main y;
sub;
end;
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
