ISRO Scientist/Engineer CSE 2017Compiler Design › Code Optimization and Runtime Environment
ISRO Scientist/Engineer CSE 2017 PYQ: Which languages necessarily need heap allocation in the runtime environment?
Which languages necessarily need heap allocation in the runtime environment?
- AThose that support recursion
- BThose that use dynamic scoping
- CThose that use global variables
- DThose that allow dynamic data structuresCorrect answer
Answer
(D) Those that allow dynamic data structures
Approach
Evaluate each language feature against whether it inherently requires runtime heap allocation. Heap is needed when memory size/lifetime cannot be determined at compile time and must be managed dynamically.
Reviewed by ISRO IQ Editorial Team.