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 is a character in c++?

1036


How do you initialize a string in c++?

991


How can you quickly find the number of elements stored in a static array?

1087


Why c++ is faster than java?

1051


which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

1176


What do you mean by function pointer?

1098


Explain rethrowing exceptions with an example?

1019


Why do we need c++?

1045


What is the use of map in c++?

1140


Why c++ is not a pure oop language?

1032


What is singleton pattern in c++?

984


describe private access specifiers?

1221


What is expression parser in c++

2491


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

982


How do you establish an is-a relationship?

1139