What is the difference among malloc/free and new/delete?, C/C++ Programming

Assignment Help:

What is the difference among malloc/free and new/delete?

A: Malloc/free do not know about destructors and constructors. New & delete create and destroy objects, whereas malloc & free allocate and deallocate memory.

 


Related Discussions:- What is the difference among malloc/free and new/delete?

Assignment help, It''s that spooky time of year when the dead walk the Eart...

It''s that spooky time of year when the dead walk the Earth, things go bump in the night, and the Centers for Disease Control (CDC) recognizes the need for zombie preparedness (

Operation on array - c program, Operation on array: void Array::add( O...

Operation on array: void Array::add( Object& toAdd ) {     lastElementIndex++;     while( ptrAt( lastElementIndex ) != ZERO &&            lastElementIndex

String, A string is said to be "Beautiful"€, if it contains only non repet...

A string is said to be "Beautiful"€, if it contains only non repetitive alphabets

C program to store all ascii char into a file, Program is to store all ASCI...

Program is to store all ASCII char into a file: void main()     {   ofstream  fout("ascii.txt");   int i,n=256;   for(i=1;i     {     fout     }

Arithmetic operation, a program that declares and prompts the user to enter...

a program that declares and prompts the user to enter two integer and performs the five arithmetic operations

OpenGL configured environment, 1. Using Visual C++ and your OpenGL co...

1. Using Visual C++ and your OpenGL configured environment, write an application that displays a “unique” graphical scene that you designed and coded for this course. What yo

Create cpp code for identify objects and their relationships, You are setti...

You are setting up an information system for a DVD Rental Company called Box office. The new system need to hold information about customers and DVDs rentals, payments and fines. C

Difference between method overloading and method overriding, Overloading a ...

Overloading a method (or function) in C++ is the ability for functions of the similar name to be defined as long as these methods have dissimilar signatures (different set of param

If one won''t explicitly call the destructor of a local then , if one won't...

if one won't explicitly call the destructor of a local; then how does he handle the above situation?

Logic behind object oriented programming, In this we will take a closer loo...

In this we will take a closer look at the logic behind Object Oriented Programming.  Read through the pseudocode listed below and answer the following questions. Class Square

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd