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's a good way to check for "close enough" floating-point equality?

1106


What are the restrictions of a modulus operator?

1070


How can I call a function with an argument list built up at run time?

1180


What are pointers? What are stacks and queues?

1081


What does p mean in physics?

1001


What is scope of variable in c?

1003


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5413


How can you find out how much memory is available?

1024


What is define directive?

1088


Is null always defined as 0(zero)?

1056


What is difference between %d and %i in c?

1186


Explain what are reserved words?

1054


Is it possible to have a function as a parameter in another function?

1043


What is a structure in c language. how to initialise a structure in c?

1029


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

2173