In which memory a class gets stored(in heap /in stack)?
And why??
Answers were Sorted based on User's Feedback
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 |
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 |
which operator is used for performing an exponential operation a) > b) ^ c) none
What is the this pointer?
why the size of an empty class is 1
Is atoi safe?
Profiler in projects?
Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work
Difference between Overloading and Overriding?
35 Answers Appnetix Techno, GameLoft, HP, IBM, NIIT, Rohde and Schwarz,
What does it mean to declare a member function as static?
What is a container class? What are the types of container classes in c++?
How to reduce a final size of executable?
5. Can inline functions have a recursion?
Define virtual constructor.