A typical memory representation of C program consists of following sections.
Text Segment: A text segment, also known as a code segment or simply as text, is one of the sections of a program in an object file or in memory, which contains executable instructions.
Initialized Data Segment: Initialized data segment, usually called simply the Data Segment. A data segment is a portion of virtual address space of a program, which contains the global variables and static variables that are initialized by the programmer. This segment can be further classified into initialized read-only area and initialized read-write area.
Uninitialized Data Segment: Uninitialized data segment, often called the “bss” segment, named after an ancient assembler operator that stood for “block started by symbol.” Data in this segment is initialized by the kernel to arithmetic 0 before the program starts executing.
Stack: Auto variables are stored in stack.
Heap: Dynamic memory allocated variables are stored on heap.