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 |
Write the program form Armstrong no in c++?
What is the use of object in c++?
Is c++ a high level language?
What is the meaning of c++?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
What is private inheritance?
Do you know what are pure virtual functions?
Can a constructor be private?
What are raw sockets, where they are efficient?
What do nonglobal variables default to a) auto b) register c) static
Can I uninstall microsoft c++ redistributable?
What is the type of 'this' pointer?