What is the difference between new/delete and malloc/free?



What is the difference between new/delete and malloc/free?..

Answer / neelam saini

Malloc/free do not know about constructors and destructors. New and delete create and destroy objects, while malloc and free allocate and deallocate memory.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is runtime polymorphism in c++?

0 Answers  


What is scope resolution operator in c++ with example?

0 Answers  


Why can templates only be implemented in the header file?

0 Answers  


Why do we need function?

0 Answers  


How would you call C functions from C++ and vice versa?

0 Answers   Genpact,






What do you mean by global variables?

0 Answers  


What is a friend function in c++?

0 Answers  


What is an incomplete type?

1 Answers  


Is it possible to provide default values while overloading a binary operator?

0 Answers  


Differentiate between a constructor and a method in C++.

0 Answers   Tech Mahindra,


why we cant create array of refrences

4 Answers  


What is a pdb file?

0 Answers  


Categories