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 are difference between c and c++?

9 Answers   Accenture,


If dog is a friend of boy, is boy a friend of dog?

0 Answers  


Explain the use of vtable.

0 Answers  


in C++ , the word plus plus who found this?

4 Answers  


What are the 3 levels of programming languages?

0 Answers  


What is a reference in C++?

1 Answers  


What is buffer and example?

0 Answers  


Give an example of run-time polymorphism/virtual functions.

0 Answers  


How the endl and setw manipulator works?

0 Answers  


What is the difference between *p++ and (*p)++ ?

0 Answers  


What is stack unwinding?

0 Answers  


Which software is best for coding?

0 Answers  


Categories