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?

Boardcoloring, color representation 0,1,2,3,4,5,6,7,.......

color representation 0,1,2,3,4,5,6,7,.......

Pointers with an array, // Basic pointer code #include "stdafx.h" #in...

// Basic pointer code #include "stdafx.h" #include iostream using namespace std; int _tmain(int argc, _TCHAR* argv[]) {             int FirstNumber, SecondNumber;

#CompilerRelated, #C Why don''t online compilers support the header file?...

#C Why don''t online compilers support the header file? What can I do to resolve this? PS. I have tried , does''nt work either. Thannk in advance.

Statistical and Numerical methods using C++–, An experiment succeeds twice ...

An experiment succeeds twice as often as it fails. Find the chance that in the next six trials there will be at least four successes.

Blackjack Game help, I can''t figure out how to stop the programming from h...

I can''t figure out how to stop the programming from hitting for the player even when they type in stand.

Should i call a destructor explicitly on a local variable?, Should I call a...

Should I call a destructor explicitly on a local variable?

Algorithm and flowcharts, algorithm to find out all the factors of given po...

algorithm to find out all the factors of given positive integers

The Polishing Game, Byteland county is very famous for luminous jewels. Lum...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

What is the significance of external declaration, Problem 1 What is the...

Problem 1 What is the difference between function declaration and function definition? 2 Write a recursive function to find sum of even numbers from 2 to 10. 3 List some

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