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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c++ free?

704


what is the use of void main() in C++ language?

761


Explain one-definition rule (odr).

757


How does com provide language transparency?

697


Differentiate between an inspector and a mutator ?

790






What is :: operator in c++?

684


What are the two shift operators and what are their functions?

668


What is the use of bit fields in structure declaration?

628


Difference between overloaded functions and overridden functions

681


How would you find out if a linked-list is a cycle or not?

642


What is a lambda function c++?

660


What are maps in c++?

591


Describe the syntax of single inheritance in C++?

737


What is pointer -to-members in C++? Give their syntax?

688


How to declaring variables in c++?

761