Answer Posted / skybeaver
The "new" operator allocates a new instance of an object
from the heap, utilising the most appropriate constructor
for the arguments passed.
Like many operators in C++, the "new" operator for a
particular class can be overriden, although there is rarely
a need to do so. "operator new" is the mechanism for
overriding the default heap allocation logic. Ask your
interviewer to provide you with a concrete example of when
he or she has been required to do this.
| Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
What is inheritance and how many types of inheritance?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What are classes oop?
What is interface in oop?
Where You Can Use Interface in your Project
What is class encapsulation?
When not to use object oriented programming?
What is multilevel inheritance?
What is object-oriented programming? Webopedia definition
Write a program to reverse a string using recursive function?
What is the real life example of polymorphism?
How do you define social class?
What is difference between abstraction and encapsulation?
What is abstraction oop?
Can we have inheritance without polymorphism?