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 |
Write a program using display() function which takes two arguments.
Do we have to use initialization list in spite of the assignment in constructors?
Distinguish between new and malloc and delete and free().
What is the size of pointer ? Also size of pointer in 64 bit pointer
Should a constructor be public or private?
What is long in c++?
Which bit wise operator is suitable for turning off a particular bit in a number?
Write a single instruction that will find the remainder of integral division when x is divided by y. Have the answer stored in z.
What is virtual destructor ans explain its use?
Explain the properties and principles of oop.
What is the difference between map and hashmap in c++?
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?