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


In which memory a class gets stored(in heap /in stack)?
And why??

Answers were Sorted based on User's Feedback



In which memory a class gets stored(in heap /in stack)? And why??..

Answer / pravin

The stack is a place in the computer memory where all the variables that are declared and initialized before runtime are stored. The heap is the section of computer memory where all the variables created or initialized at runtime are stored.
Hence,classes will be stored in heap memory.

Is This Answer Correct ?    6 Yes 3 No

In which memory a class gets stored(in heap /in stack)? And why??..

Answer / ravi.g

Usually class will get stored when the object/s are created.

Class will get sored in stack segment when the object is
created inside the functions.

When objects are created globally they will get stored in
the data segment.

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More C++ General Interview Questions

What is the difference between a shallow copy and a deep copy?

3 Answers  


What are advantages and disadvantages of Design patterns?

7 Answers   IBM, Vodafone,


Eplain extern keyword?

0 Answers  


How do you remove an element from a set in c++?

0 Answers  


What is the full name of logo?

0 Answers  


Explain the difference between 'operator new' and the 'new' operator?

1 Answers   Lucent, TCS,


What is the difference between Class and Structure?

40 Answers   HP, IBM, Samsung, TCS,


Explain the use of virtual destructor?

0 Answers  


What is ios in c++?

0 Answers  


write the programme that convert a interger to biniry number

1 Answers   Amazon,


When should I use unitbuf flag?

0 Answers  


Is c++ a difficult language?

0 Answers  


Categories