a. Assuming static scoping, in the following, which declaration of X is the correct one for a reference to X?
Sub1 –
Sub2 –
Sub3 –
b. Repeat
part a, but assuming dynamic scoping.
Sub1 –
Sub2 –
Sub3 –
Consider the following Ada skeletal program procedure Main is 1 X : Integer procedure Subl is procedure Sub2 is begin — of Sub2 end Sub2; begin — of Subl end Subl; procedure Sub3 is X : Integer; begin – of Sub3 end Sub3; begin -_ end Main; Assume that the execution of this program is in the following unit order: – ofMain Main calls Sub3 Sub3 calls Subl Subl calls Sub2