Which languages necessarily need heap allocation in the runtime environment?
Same as previous year question
We store global variable in heap memory.
then why not option D also?
@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.
Heap allocation is needed for dynamic data structures like tree, linked list, etc