Computer Science, asked by Mohit0, 1 year ago

Difference between malloc() and operator new.

Answers

Answered by Anonymous
0
Both are used for same purpose, but still they have some differences, the differences are:
 new is an operator whereas malloc() is a library function.
 new allocates memory and calls constructor for object initialization.
But malloc() allocates memory and does not call constructor.
Similar questions