How new/delete differs from malloc()/free?



How new/delete differs from malloc()/free?..

Answer / Amit Kumar Yadav

new/delete in C++ are part of the object-oriented memory management system and handle dynamic memory allocation and deallocation, including constructing and destructing objects as needed. malloc()/free in C are low-level functions for allocating and freeing raw blocks of memory without any constructor or destructor calls.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Write the program form Armstrong no in c++?

11 Answers   HCL,


What is the use of object in c++?

1 Answers  


Is c++ a high level language?

1 Answers  


What is the meaning of c++?

1 Answers  


What is the maximum combined length of command line arguments including the space between adjacent arguments?

1 Answers  


What is private inheritance?

1 Answers  


Do you know what are pure virtual functions?

1 Answers  


Can a constructor be private?

1 Answers  


What are raw sockets, where they are efficient?

2 Answers   Symphony,


What do nonglobal variables default to a) auto b) register c) static

1 Answers  


Can I uninstall microsoft c++ redistributable?

1 Answers  


What is the type of 'this' pointer?

1 Answers  


Categories