Which of the following does not reside in the activation record block of a…
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
Attempted by 119 students.
Show answer & explanation
Correct answer: A
An activation record (stack frame) of a function contains: Local variables (non-static)
Return address
Control link / pointer to caller's activation record
Temporary values
But global variables are not stored in the activation record because they are stored in a separate data segment , not on the stack. Therefore, global variables do not reside in the activation record block.