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 a tuple c++?

0 Answers  


What is the output of the following program? Why?

0 Answers  


What is malloc in c++?

0 Answers  


What is an adaptor class or Wrapper class?

1 Answers  


What is the difference between *p++ and (*p)++ ?

0 Answers  






What is the size of pointer ? Also size of pointer in 64 bit pointer

4 Answers  


What does it mean to declare a member function as static?

0 Answers  


What are pointer-to-members in C++? Give their syntax.

0 Answers   HAL,


Write a corrected statement in c++ so that the statement will work properly. if (x = y) x = 2*z;

2 Answers  


Is set c++?

0 Answers  


How much do coding jobs pay?

0 Answers  


Can I learn c++ without knowing c?

0 Answers  


Categories