What is the difference between operator new and the new operator?

What is the difference between operator new and the new operator?

Many diff are there :
Operator new is bassically just like malloc and new is the conventinally new in C++. The "New" operator allocates a new instance of an object 
from the heap, Its utilising the most appropriate constructor for the arguments passed. This is 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.

By:Umang
Date:2031-12-08 00:00:00

Operator new() use for the Operator overloading but New Operator for memory allocation.

By:Umang
Date:2031-12-08 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher