Question: 12. Consider the following program: procedure Main is X, Y, Z : Integer procedure Subl is A, Y, 2 : Integer; begin -of Subl end;of

12. Consider the following program: procedure Main is X, Y, Z : Integer procedure Subl is A, Y, 2 : Integer; begin -of Subl end;of procedure Sub2 is Subl A, B, Z: Integer begin of Sub2 end; -- of Sub2 procedure Sub3 is , , W : Integer; begin of Sub3 end; of Sub3 begin of Main end; of Main Given the following calling sequences and assuming that dynamic scop ing is used, what variables are visible during execution of the last subpro- gram activated Include with each visible variable the name of the unit where it is declared a. Main calls Subl; Subl calls Sub2; Sub2 calls Sub3 b. Main calls Subl; Subl calls Sub3. c. Main calls Sub2; Sub2 calls Sub3; Sub3 calls Subl d. Main calls Sub3; Sub3 calls Sub1. e. Main calls Subl; Subl calls Sub3; Sub3 calls Sub2 f. Main calls Sub3; Sub3 calls Sub2; Sub2 calls Subl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
