Show the stack with all activation record instances, including static and dynamic chains, when execution reaches position 1 in the following skeletal program. Assume bigsub is at level 1.

function bigsub() {

function a() {

function b() {

... <----------------------------1

} // end of b

function c() {

...

b();

...

} // end of c

...

c();

} // end of a

...

a();

...

}// end of bigsum

Respuesta :

Answer:

Activation Records

The storage (for formals, local variables, function results etc.) needed for execution of a

subprogram is organized as an activation record.

An Activation Record for “Simple” Subprograms

.

Activation Record for a Language with Stack-Dynamic Local Variables

Dynamic link: points to the top of an activation record of the caller

Explanation: