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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between an array and a list?

755


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2278


How many types of scopes are there in c++?

766


How do you sort a sort function in c++ to sort in descending order?

768


Explain what happens when a pointer is deleted twice?

984






What is one dimensional array in c++?

796


Which software is used to run c++ program?

708


Which is the best c++ compiler for beginners?

771


What is vector pair in c++?

917


What language does google use?

826


What is the latest version on c++?

850


How many types of comments are there in c++?

745


Explain the concept of memory leak?

834


What is the use of endl in c++ give an example?

860


Explain mutable storage class specifier.

822