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
What does iomanip mean in c++?
Which bit wise operator is suitable for turning off a particular bit in a number?
Can you explicitly call a destructor on a local variable?
What is c++ iterator?
What does scope resolution operator do?
Difference between pointer to constant vs. Pointer constant
Why was c++ created?
Which software is used for c++ programming?
How can I learn dev c++ programming?
Is c++ proprietary?
What is the cout in c++?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
Differentiate between late binding and early binding.
What is the use of endl in c++?
What does the linker do?