New and delete in C++ by R4R Team

New and delete are the keywords in C++ that are used as a dynamic memory allocation and memory de-allocation.

-Used for dynamic memory allocation
-We can make linked list data structure using dynamic memory allocation.
-Same as malloc keyword of C language.
-define in alloc.h heador file
-give memory to objects like:
Myclass object=new Myclass()

-used for memory-de-allocation.
-used in class destructor.
-used to delete anu node in linked list.
-Same as free keyword of C language.
-define in alloc.h heador file

Leave a Comment:
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!