Question: Consider the Ada program given below. procedure Main is A, B: Integer; procedure Sub1 (C: Integer) is D: Integer; begin - of Sub1 end: --

 Consider the Ada program given below. procedure Main is A, B:

Consider the Ada program given below. procedure Main is A, B: Integer; procedure Sub1 (C: Integer) is D: Integer; begin - of Sub1 end: -- of Sub1 procedure Sub2 (E: Integer) is procedure Sub3 (F: Integer) is B, D: Integer; begin - of Sub3 Sub1(100); end: -- of Sub3 begin -- of Sub2 Sub3(E); end: - of Sub2 begin - of Main Sub2(10); end: - of Main Ada is a statically scoped language. In the above program, the Main function invokes Sub2: Sub2 invokes Sub3; and Sub3 invokes Sub1. 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!