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 is auto type c++?
What is a map in c++?
What is the most common mistake on c++ and oo projects?
Explain queue. How it can be implemented?
What is a lambda function c++?
Explain the isa and hasa class relationships. How would you implement each?
what Is DCS ? what i will get benefit when i did?
Why do we use the using declaration?
What is the difference between new() and malloc()?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create
What is static class data?
What is atoi?
What is an overflow error?
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
What is the most useful programming language?