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 enum be null?
How Do you Code Composition and Aggregation in C++ ?
why reinterpret cast is considered dangerous?
Why do we use class in oops?
What causes polymorphism?
What are the 5 oop principles?
Can private class be inherited?
What is difference between abstraction and encapsulation?
What is abstraction and encapsulation?
Why interface is used?
What are the 3 pillars of oop?
What is the important feature of inheritance?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What are the benefits of interface?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?