Consider the following program:
|
|
|
|
Which one of the following options represents the activation tree corresponding to the main function?
GATE CSE 2023Compiler Design › Runtime Environments & Parameter PassingVerified
Consider the following program:
|
|
|
|
Which one of the following options represents the activation tree corresponding to the main function?
(A)
Trace the actual function calls in execution order and build the activation tree. Then compare each option with the expected tree.
Tracing the call sequence gives exactly the tree shown in option A.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.