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

Using a smart pointer can we iterate through a container?

1026


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1966


What do the keywords volatile and mean mutable?

1006


Why should we use null or zero in a program?

976


How can an improvement in the quality of software be done by try/catch/throw?

1007


Is empty stack c++?

942


Explain the difference between struct and class in terms of access modifier.

1134


Write a note about the virtual member function?

1011


How do you declare A pointer to a function which receives nothing and returns nothing

1175


Describe public access specifiers?

1040


What is decltype c++?

950


Will the following program execute?

994


What is a container class?

1061


What is class definition in c++ ?

1032


What is const pointer and const reference?

1087