Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

explain memory layout of a C program

Answer Posted / pankaj saraf

Memory Layout consists following segments where data/text
are managed:
1) Text Segment : Consists serial of instruction.
2) Data Segment : Consists, Data default or defined class
specifier
i) Stack Segment : Area where the current function data
is managed.
ii) Heap Segment : Area where dynamically allocated data
stored.
3) BSS Segment: For uninitialized data.

Data segment is actually contains the static data which is
decided on the compile time. Rest of Area is used by Stack
and Heap which is actually modified run time. Stack grows
from higher address to lower Address. Heap grow just
opposite to the stack.

Anything else you guys are invited to add. :)

Is This Answer Correct ?    36 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are multibyte characters?

1141


Can you think of a logic behind the game minesweeper.

2475


int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above

1315


What is return in c programming?

983


What is static and auto variables in c?

1098


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

2103


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

1012


Explain what is the stack?

1114


How do you use a pointer to a function?

1098


please explain every phase in the "SDLC" in the dotnet.

2633


When should the volatile modifier be used?

1199


Which is better malloc or calloc?

1111


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

1122


Is c weakly typed?

1034


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2110