
1. Stack area:-
All automatic variables are created into stack area.Default storage class of any local variable is auto.This variable may be int, char, float, array, pointer, struct, union etc.It also return function argument and return address.It follow LIFO data structure. It has two part one for initialize variable another for non-initialize variable.All initialize variable are more nearer than uninitialized variable and vice versa.
2. Data area :
All static and extern variable are created in the data area.
3. Heap area:
Malloc and calloc always allocate memory in the heap area.It is used for dynamic memory allocation.It’s size depends upon free space in the memory.
4. Code area:
Function pointer can only access code area.Size of this area is always fixed and it is read only area.
8 comments:
ok thank you now i know about data segment
Thank you so much.
oh good knowledge is wealth
Very nice & useful explanation....
dude pls dont close this site..useful
All initialize variable are more nearer than uninitialized variable and vice versa.
nearer???????
oh thanx...
can any one explain me about code area..? how function pointer only can access this area..?
Post a Comment