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 are separators in c++?

0 Answers  


Write about an iterator class?

0 Answers  


What happens when you make call 'delete this;'?

0 Answers  


What is c++ hash?

0 Answers  


What do you mean by overhead in c++?

0 Answers  


Differences between private, protected and public and give examples.

0 Answers  


Why is it called c++?

0 Answers  


write a C++ programming using for loop: * * * * * * * * * *

4 Answers   TCS,


On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?

0 Answers  


How do we implement inheritance in c++?

0 Answers  


Can java be faster than c++?

0 Answers  


Why can’t you call invariants() as the first line of your constructor?

0 Answers  


Categories