Valeo Interview Question

Memory organization and use of heap - stack

Interview Answer

Anonymous

Aug 16, 2016

Memory Organization: *Text Memory *stack *Heap *Data Segment *BSS (uninitialized data segment) use of stack : automatic memory allocation occurs in stack , last in first out (LIFO) , free itself automatically after the end of the variable's lifetime use of heap : dynamic memory allocation occurs in heap , it must be free manually (using delete() )

2