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...

Generally variables are stored in heap memory. When he
variables are created in stack?

Answer Posted / vadivelt

It is wrong to say that genarally variables will be stored
in heap memmory.

Bcos Storage area always depends on the storage class of
the variable.

According to the C standard the storage will be.
1.variable with storage class 'auto' ie., local to the
function - in stack memory.
2.variable with storage class 'extern' and 'static' in data
segment.
3.variable with storage class 'register' in processor
register. But this register variable will be treated as
auto when there is no enough memory in the processor.

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by delegate? Can a user retain delegates?

906


Who calls main function?

1071


What is constructor and destructor in c++?

1079


What are the classes in c++?

1080


What are the different types of comments allowed in c++?

953


Please explain class & object in c++?

1066


Define pointers?

1024


Can turbo c++ run c program?

1058


Explain how functions are classified in C++ ?

1197


Where are setjmp and longjmp used in c++?

1072


what is multi-threading in C++?

1028


Which programming language is best?

954


Can we sort map in c++?

982


What is the difference between a definition and a declaration?

1026


what is a class? Explain with an example.

1114