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 |
Explain the differences between private, public and protected and give examples.
How are virtual functions implemented in c++?
What is ios :: in in c++?
what is an array
Can I uninstall microsoft c++ redistributable?
Is there any difference between dlearations int* x and int *x? If so tell me the difference?
What are the various arithmetic operators in c++?
Can a constructor throw a exception? How to handle the error when the constructor fails?
What is recursion?
i want the NIC programmer-B model papaer pattren, iwant the all model papers?
What is pointer to array in c++?
when can we use virtual destructor?
7 Answers HCL, HP, Virage Logic,