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;

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

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!