text: in ' c' where global variable get stored.?   text segment(code segment): the text segment contains the actual code to be executed. it's usually sharable, so multiple instances of a program can share the text segment to lower memory requirements. this segment is usually marked read-only so a program can't modify its own instructions.  initialized data segment: this segment contains global variables which are initialized by the programmer.  uninitialized data segment: also named "bss" (block started by symbol) which was an operator used by an old assembler. this segment contains uninitialized global variables. all variables in this segment are initialized to 0 or null pointers before the program begins to execute.  the stack: the stack is a collection of stack frames which will be described in the next section. when a new frame needs to be added (as a result of a newly called function), the stack grows downward.  the heap: most dynamic memory, whether requested via c's malloc() and friends or c++'s new is doled out to the program from the heap. the c library also gets dynamic memory for its own personal workspace from the heap as well. as more memory is requested "on the fly", the heap grows upward.  hope this would be clear.