Skip to content

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?

  1. A
    Those that support recursion
  2. B
    Those that use dynamic scoping
  3. C
    Those that use global variables
  4. D
    Those that allow dynamic data structures
    Correct 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.