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

Why is c++ is better than c?

0 Answers  


What does int * mean in c++?

0 Answers  


What is pointer in c++ with example?

0 Answers  


Can we define function inside main in c++?

0 Answers  


write a porgram in c++ that reads an integer and print the biggest digit in the number

0 Answers  


What are static member functions?

0 Answers  


What is the meaning of string in c++?

0 Answers  


We use library functions in the program, in what form they are provided to the program?

0 Answers  


What is microsoft c++ redistributable?

0 Answers  


What is helper in c++?

0 Answers  


What is diamond problem in c++?

0 Answers  


Why is main function important?

0 Answers  


Categories