Activation-record questions jump between stack-frame contents, recursion, access links, aliases, and call order. Attempt each of these 12 solved questions before reading its answer and explanation. Questions 1 to 5 and 12 open on their own practice pages; for Questions 6 to 11, practise on the Activation Records & Call practice module.
Activation record MCQs: what belongs in a stack frame
Per-call data | Not a separate per-call field |
|---|---|
Return address, saved status, optional return slot, argument values or locations, control/access links, locals, temporaries | Global: static storage; heap: separate dynamic region; formal parameter: source name for passed data |
Question 1: the region outside an activation record (ISRO 2014)
Which of the following is NOT represented in a subroutine's activation record frame for a stack-based programming language?
A. Values of local variables
B. Return address
C. Heap area
D. Information needed to access non local variables
Answer: C. Heap area. Frames hold one call's locals, return point, and non-local-access data. The heap is separate and shared.
Question 2: global data versus per-call data (UPPSC Polytechnic Lecturer 2022)
Which of the following does not reside in the activation record block of a function?
A. Global variable
B. Local variable with non-static scope
C. Pointers to activation record block of parent function
D. Function return information
Answer: A. Global variable. A global has one program-level location, not one per call. Automatic locals, links, and return information belong to an invocation.
Question 3: actual and formal parameters (UPPSC Polytechnic Lecturer 2022)
Which of the following is not the part of activation record?
A. Actual parameters
B. Returned values
C. Formal parameters
D. Saved machine status
Answer: C. Formal parameters. The canonical field list is actual parameters, returned values, control link, access link, saved machine status, local data and temporaries. A formal parameter is the callee's source-level name for data that is passed in, so it is not a separate entry in that list. Question 5 quotes a C-frame list that labels the same storage differently.
Procedure-call stack MCQs: control stack and C frame organisation
The control stack holds activation records. For main -> f -> g, push AR(main), AR(f), AR(g); then pop AR(g) and AR(f) on return. Fields depend on the calling convention.
Question 4: another name for the runtime stack (HPSC 2021)
Whenever a procedure is executed, its activation record is stored on the stack, also known as:
A. Access Stack
B. Control Stack
C. Formal Stack
D. Return Stack
Answer: B. Control Stack. Calls and returns set each frame's lifetime. Return pops the executing frame and resumes its caller.
Question 5: a C activation-record distractor (BEL 2023)
Which of the following is NOT the part of the organization of C programming language Activation Record?
A. Argument count
B. Return address
C. Local data
D. Formal parameters
Answer: A. Argument count. A C frame carries the return address, the incoming parameters and automatic local data. A fixed signature is already known at compile time, and a variadic call passes its own count through the arguments, so no frame needs a universal argument-count field.
Questions 3 and 5 look like they contradict each other on formal parameters, and both keys are right for the list each one quotes. The canonical field list names that slot actual parameters, so in Question 3 formal parameters is the label that does not appear. C activation-record diagrams label the same incoming-argument storage formal parameters, so Question 5 keeps it and throws out the argument count instead. One storage area, two naming conventions: match the options against the list the question is drawn from, and never eliminate a slot only because its label changed.
Memory rule: one active invocation -> one activation record; nested call -> one more record on the control stack.
Recursion and activation-record allocation MCQs
For fact(3) -> fact(2) -> fact(1), the stack simultaneously holds AR3(n=3), AR2(n=2), AR1(n=1). One static slot gets overwritten; three runtime records preserve the values. This is dynamic stack allocation, not heap allocation.
Question 6: what recursion actually requires (GATE 2014, Set 3)
Which of the following statements are CORRECT?
1) Static allocation of all data areas by a compiler makes it impossible to implement recursion.
2) Automatic garbage collection is essential to implement recursion.
3) Dynamic allocation of activation records is essential to implement recursion.
4) Both heap and stack are essential to implement recursion.
A. 1 and 2 only
B. 2 and 3 only
C. 3 and 4 only
D. 1 and 3 only
Answer: D. 1 and 3 only. Separate runtime frames make 1 and 3 true. Stack reclamation needs neither garbage collection nor a heap, so 2 and 4 are false.
Question 7: nesting, recursion and escaping functions (GATE 2008)
Which of the following are true?
I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation
II. Multi-level access link (or display) arrangement is needed to arrange activation records only if the programming language being implemented has nesting of procedures/functions
III. Recursion in programming languages cannot be implemented with dynamic storage allocation
IV. Nesting of procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack-based allocation scheme for activation records
V. Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation records
A. II and V only
B. I, III and IV only
C. I, II and V only
D. II, III and V only
Answer: A. II and V only. I is false because recursion defeats one fixed frame. II is true because lexical nesting creates non-local lookup. III and IV are false because dynamic stack allocation supports recursion. V is true here because a returned function's environment may outlive its frame.
Call-by-reference MCQ: trace aliases before arithmetic
Map formals to caller locations before tracing values. Aliases make earlier assignments change later reads.
Question 8: aliased reference parameters (GATE 2001)
What is printed by the print statements in program P1, assuming call-by-reference parameter passing?
Program P1()
{
x = 10;
y = 3;
func1(y, x, x);
print x;
print y;
}
func1(x, y, z)
{
y = y + 4;
z = x + y + z;
}A. 10, 3
B. 31, 3
C. 27, 7
D. None of the above
Answer: B. 31, 3. Map func1.x -> P1.y, func1.y -> P1.x, func1.z -> P1.x; the last two alias. With P1.x=10, P1.y=3, y = y + 4 writes 10 + 4 = 14 to P1.x; then z = x + y + z reads 3 + 14 + 14 = 31 and writes 31 there. P1.y stays 3, so output is 31, 3.
Control links, access links and displays MCQs
A control link follows the dynamic caller; an access link follows the lexical parent. A display indexes active frames by lexical level.
Question 9: the control-link target
In an activation record, the control link points to:
A. The activation record of the caller
B. A local variable
C. The return value
D. None of the above
Answer: A. The activation record of the caller. The control link identifies the dynamic caller. It points to neither a local nor a return value.
Question 10: constant-depth non-local access (GATE 1998)
Faster access to non-local variables is achieved using an array of pointers to activation records, called a _____.
A. stack
B. heap
C. display
D. activation tree
Answer: C. display. With display[0] -> main, display[1] -> P, display[2] -> Q, level 2 directly indexes level 0. Static-link walking takes one hop per level.
Calling sequence and activation-tree MCQs
Runtime order differs from lexical scope. main calls A; A calls C, then D; main then calls B. Calls are preorder [main, A, C, D, B]; returns are postorder [C, D, A, B, main].
Question 11: frames reflect the actual call chain (GATE 2002)
In the C language, which of the following statements is true?
A. At most one activation record exists between the current activation record and the activation record for the main
B. The number of activation records between the current activation record and the activation record for the main depends on the actual function calling sequence.
C. The visibility of global variables depends on the actual function calling sequence.
D. Recursion requires the activation record for the recursive function to be saved on a different stack before the recursive function can be called.
Answer: B. The number of activation records between the current activation record and the activation record for the main depends on the actual function calling sequence. The stack records actual calls, so paths reach different depths. Globals are lexically visible; recursion pushes another frame on the same stack.
Question 12: preorder calls and postorder returns (TPSC Senior Informatics Officer 2025)
Consider the following statements :
S1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
S2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.
Which one of the following options is correct ?
A. S1 is true and S2 is false
B. S1 is false and S2 is true
C. S1 is true and S2 is true
D. S1 is false and S2 is false
Answer: C. S1 is true and S2 is true. Entry gives preorder [main, A, C, D, B]. Completion after children gives postorder [C, D, A, B, main].
How exams test activation records and procedure calls
Examiners rotate five moves on this topic: frame-content elimination (Questions 1 to 5), recursion and frame lifetime (6 to 7), alias tracing (8), dynamic versus lexical links (9 to 10), and call-tree ordering (11 to 12).
Keep these corrections ready:
Dynamic allocation is not automatically heap allocation.
Actual and formal parameters name one storage area, not two separate frame fields.
Control link: caller; access link or display: lexical nesting.
Globals are not copied into every frame.
Reference formals can alias one caller variable.
Calls: preorder; returns: postorder.
Use Lexical Analysis in Compiler Design: Tokens and Lexemes for the front end and Stacks and Queues: Operations and Uses for the LIFO model.
Activation records MCQs: the short version and next step
call -> push one frame
return -> pop one frame
control link -> caller
access link/display -> lexical parent
recursion -> multiple live frames
reference aliasing -> trace locations before values
Reattempt Questions 6 to 8 and 11 to 12 without options to test understanding, not labels.
Use GATE Guidance by Sanchit Sir for structured Compiler Design, GATE Test Series for timed practice, and GATE CS Exam Preparation as the category hub.




