adspace


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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

daily Routine of father

1483


What is the latest version on c++?

1205


Can union be self referenced?

1265


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1162


What character terminates all character array strings a) b) . c) END

1393