Question: 3. (4 points) Consider the Ada program given below. 1 procedure Main is A, B, C : Integer ; procedure Sub1 (C:Integer) is D, E:

 3. (4 points) Consider the Ada program given below. 1 procedure

3. (4 points) Consider the Ada program given below. 1 procedure Main is A, B, C : Integer ; procedure Sub1 (C:Integer) is D, E: Integer ; begin -- of Sub1 12 end ; -- of Sub1 procedure Sub2 (E: Integer) is procedure Sub (F:Integer) is 10 C, D: Integer ; begin -- of Sub3 Sub1 (100); 13 end; -- of Sub3 14 begin -- of Sub2 15 Sub3(E); 16 end; -- of Sub2 17 begin -- of Main 18 Sub2 (10); 19 end; -- of Main Ada is a statically scoped language. In the above program, the Main function invokes Sub2; Sub2 invokes Sub3; and Sub3 invokes Subl. Draw the stack of activation records when the program's execution reaches before line 12 and line 6. For each activation record, include local variables, parameters, the dynamic link, the static link, and the return address

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!