Difference between new operator and operator new

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


Please Help Members By Posting Answers For Below Questions

What is object in oop?

782


What is abstraction oop?

717


Which is not an object oriented programming language?

625


What is encapsulation example?

639


what is different between oops and c++

2081






Why do we use encapsulation in oops?

617


Why is destructor used?

678


write a programe to calculate the simple intrest and compund intrest using by function overlading

1759


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

2853


What is polymorphism in oops with example?

641


how to get the oracle certification? send me the answer

1744


Can destructor be overloaded?

693


What is use of overloading?

726


What is a class and object?

688


What is pure oop?

688