Question: What is being printed in the following code assuming 1. Dynamic Scoping 2. Static Scoping procedure Main is x: Integer; procedure Sub1 is begin put(x);
What is being printed in the following code assuming 1. Dynamic Scoping 2. Static Scoping
procedure Main is x: Integer; procedure Sub1 is begin put(x); end; procedure Sub2 is x:Integer; begin x:=10; Sub1; end; begin x:=5; Sub2; end;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
