Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

Show the general forms for 'new' and 'delete'.What are some advantages of using them instead of using malloc() and free() in a C++ program.

Show the general forms for 'new' and 'delete'.What are some advantages of using them instead of malloc() and free() in a C++ program.

Answers


Davis
-General forms
p-var=new type;
delete p-var;

-when using 'new',you don't need to use the cast type
-you do not need to use sizeof or even include in your program.
Githiari answered the question on February 4, 2018 at 11:35

Answer Attachments

Exams With Marking Schemes

Related Questions