Question: What is the output of following program using both Static and Dynamic scoping begin integer x, y; function sub1; begin print (y in subl-y) end;

 What is the output of following program using both Static and

What is the output of following program using both Static and Dynamic scoping begin integer x, y; function sub1; begin print ("y in subl-y) end; function sub2 (y: integer): begin print ("z in sub2-", x); print ("y in sub2 ", y): sub1; end; x: 10; y: # 5; print sub2(1) subl; ("y in main ",y); end; Output: Static Scoping Dynamic Scoping

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