Activation Records and Storage Allocation MCQs January 8, 2026December 14, 2024 by u930973931_answers 30 min Score: 0 Attempted: 0/30 Subscribe 1. What is an activation record (AR)? (A) A data structure that stores information about a function call (B) Memory allocated for global variables (C) A register in CPU (D) Storage for heap variables 2. Which of the following is typically stored in an activation record? (A) Return address (B) Parameters of the function (C) Local variables (D) All of the above 3. Where are activation records usually stored? (A) Heap (B) Stack (C) Static memory (D) CPU cache 4. What does the dynamic link in an activation record point to? (A) Heap memory (B) Callee’s AR (C) Global variables (D) Caller’s AR 5. What is the purpose of the return address in an AR? (A) To allocate heap memory (B) To store function parameters (C) To indicate where to resume execution after function returns (D) To store local variables 6. Which field in an AR stores temporary results of computations? (A) Local variables (B) Control link (C) Return value (D) Temporary storage 7. What is a static link used for in nested functions? (A) To point to the previous AR on the stack (B) To allocate heap memory (C) To store function parameters (D) To access non-local variables in outer scopes 8. What type of memory allocation is used for activation records? (A) Static allocation (B) Stack allocation (C) Heap allocation (D) Register allocation 9. Which of the following is true about stack growth? (A) Stack grows downwards in memory (B) Stack grows upwards in memory (C) Stack size is unlimited (D) Stack is stored in heap 10. What happens to an AR when a function returns? (A) It remains in memory (B) It moves to heap (C) It is deallocated and popped from the stack (D) It becomes global memory 11. Which of the following is stored in the static part of an activation record? (A) Saved registers and return address (B) Parameters (C) Local variables (D) Dynamically allocated memory 12. Which part of an activation record contains space for a function’s return value? (A) Return value field (B) Local variables (C) Control link (D) Static link 13. Which type of storage allocation is used for global variables? (A) Static allocation (B) Stack allocation (C) Heap allocation (D) Temporary allocation 14. What does dynamic storage allocation refer to? (A) Memory allocated at runtime on the heap (B) Memory allocated at compile time (C) Memory in registers (D) Constant memory allocation 15. Which of the following is NOT typically a component of an AR? (A) Parameters (B) Disk storage pointer (C) Return address (D) Local variables 16. What is the purpose of the control link in an AR? (A) To point to the caller’s AR (B) To store temporary results (C) To allocate memory in heap (D) To manage registers 17. Which allocation method is suitable for recursive function calls? (A) Stack allocation (B) Static allocation (C) Heap allocation (D) Register allocation 18. Which of the following is true about heap memory in storage allocation? (A) Lifetime is determined at runtime (B) Used for activation records (C) Automatically popped on function return (D) Follows LIFO order 19. What is the main disadvantage of heap allocation compared to stack allocation? (A) Slower allocation and deallocation (B) Limited memory (C) Cannot store large data (D) LIFO only 20. What does the term “lexical scope” mean in context of ARs? (A) Scope of variables determined at runtime (B) Global variable access (C) Scope of variables determined at compile time (D) Heap memory allocation 21. Which memory allocation type is used for constants? (A) Static memory (B) Heap (C) Stack (D) Registers 22. Which link is necessary for languages that allow nested subroutines? (A) Control link (B) Dynamic link (C) Static link (D) Heap link 23. Which of the following is true about stack frames in recursion? (A) Only one frame exists at a time (B) Each call creates a new frame (C) Frames are stored in heap (D) Frames persist after program termination 24. Which allocation type is suitable for variables whose lifetime is unpredictable? (A) Stack allocation (B) Static allocation (C) Heap allocation (D) Register allocation 25. What does an activation record typically do for parameter passing? (A) Manages heap allocation (B) Allocates global memory (C) Stores copies or references to parameters (D) Handles I/O operations 26. In a typical AR, which field helps in implementing return after function execution? (A) Parameters (B) Return address (C) Local variables (D) Dynamic link 27. Which of the following can cause stack overflow? (A) Deep or infinite recursion (B) Large static variables (C) Heap allocation (D) Using constants 28. What is the main advantage of using stack-based storage for activation records? (A) Fast allocation and deallocation (B) Flexibility in size (C) Lifetime independent of scope (D) Automatic garbage collection 29. Which memory allocation technique allows multiple ARs to coexist for recursive calls? (A) Stack memory (B) Static memory (C) Heap memory (D) Constant memory 30. What is a major difference between heap and stack memory in storage allocation? (A) Stack is slower than heap (B) Stack follows LIFO order; heap does not (C) Heap cannot allocate variable size (D) Stack is only for global variables