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


Next: Discuss five scientific concepts that pre-school children would acquire from using balloons
Previous: Determine the derivative y' given y=(x+2)(x+3)/(x+1)(x+2)

View More Computer Science Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions