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

Explain the differences between private, public and protected and give examples.

0 Answers  


How are virtual functions implemented in c++?

0 Answers  


What is ios :: in in c++?

0 Answers  


what is an array

20 Answers  


Can I uninstall microsoft c++ redistributable?

0 Answers  


Is there any difference between dlearations int* x and int *x? If so tell me the difference?

16 Answers   Lason,


What are the various arithmetic operators in c++?

0 Answers  


Can a constructor throw a exception? How to handle the error when the constructor fails?

1 Answers  


What is recursion?

6 Answers  


i want the NIC programmer-B model papaer pattren, iwant the all model papers?

15 Answers   NIC,


What is pointer to array in c++?

0 Answers  


when can we use virtual destructor?

7 Answers   HCL, HP, Virage Logic,


Categories