Question: Consider the following skeletal Ada program: procedure Main is X: Integer; procedure Proc1 is begin __ of Proc1 is Put (X); end; __ of Proc1

Consider the following skeletal Ada program: procedure Main is X: Integer; procedure Proc1 is begin __ of Proc1 is Put (X); end; __ of Proc1 procedure Proc2 is X: Integer; begin __ of Proc 2 X:= 10; Proc1 end; __ of Proc2 begin __ of Main X:= 5; Proc2 end __ of Main Assume Put is an output statement Assume this program was compiled and executed using static scoping rules. What value of X is printed in procedure Proc1? Assume this program was compiled and executed using dynamic scoping rules. What value of X is printed in procedure Proc1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
