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
Can bst contain duplicates?
What is polymorphism and why is it important?
is there any choice in opting subjects like 4 out of 7
What is a class and object?
• What are the desirable attributes for memory managment?
How do you achieve runtime polymorphism?
What is variable example?
What is difference between data abstraction and encapsulation?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
Can main method override?
What are constructors in oop?
What is an interface in oop?
What is polymorphism and types?
Explain virtual inheritance?
Can we create object of interface?