94.2k views
5 votes
3. Show the stack with all activation record instances (with all fields), when execution reaches position 1 in the following skeletal program. Assume bigsub is at level 1. 15 pts function bigsub() { var bigl1; function a(flag, ap1) { var al1; function b() { var bl1, bl2; ... a(false, bl2); ... } // end of b ... if (flag) b(); else c(ap1, al1); ... } // end of a function c(cp1, cp2) { function d(dp1, dp2) { var dl1; ... <------------------------1 } // end of d ... d(cp1, cp2); } // end of c ... a(true, bigl1); ... } // end of bigsub The calling sequence for this program for execution to reach d is bigsub calls a a calls b b calls a a calls c c calls d

1 Answer

2 votes

Answer:

Check the explanation

Step-by-step explanation:

The chain of static links is being referred to as static chain if it connects a particular activation record instances (ari) in the stack.

The chain of dynamic links is being referred to as dynamic chain if connected in the stack at a given time.

Kindly check the diagram in the attached image below.

3. Show the stack with all activation record instances (with all fields), when execution-example-1
User Svangordon
by
6.8k points