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 |
what are difference between c and c++?
If dog is a friend of boy, is boy a friend of dog?
Explain the use of vtable.
in C++ , the word plus plus who found this?
What are the 3 levels of programming languages?
What is a reference in C++?
What is buffer and example?
Give an example of run-time polymorphism/virtual functions.
How the endl and setw manipulator works?
What is the difference between *p++ and (*p)++ ?
What is stack unwinding?
Which software is best for coding?