Which languages necessarily need heap allocation in the runtime environment?
Same as previous year question
https://gateoverflow.in/2226/gate1997-1-10
We store global variable in heap memory.
then why not option D also?
@sushmita
@Sankaranarayanan P.N
@jothee
@jlimbasiya Global variables are stored in the data section of the program, not heap, because on heap we can only access memory through pointers. But in many programs we do not necessarily use malloc(), calloc() etc to define global variables.
C
Heap allocation is needed for dynamic data structures like tree, linked list, etc
64.3k questions
77.9k answers
244k comments
80.0k users