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

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.

 

Posted Date: 3/16/2013 3:20:37 AM | Location : United States







Related Discussions:- What is the difference among malloc/free and new/delete?, Assignment Help, Ask Question on What is the difference among malloc/free and new/delete?, Get Answer, Expert's Help, What is the difference among malloc/free and new/delete? Discussions

Write discussion on What is the difference among malloc/free and new/delete?
Your posts are moderated
Related Questions
Floating  literal They can be written in common decimal as well as scientific notation (floating point representation). By default it is of type double. F, L is applied only to

Mathematical Statements and assignments    Within C we can directly load up the variable from within the program using the mathematical expression equates (=) e.g.   a= 'h'

program to convert string from super ascii string with minimum cost

FUNCTIONS It refers to a subprogram that is meant to do a certain task. It is basically used to execute a set of operations and return information to the main or calling functio

In the Byteland country a string "s" is said to super ascii string if and only if count of each charecter in the string is equal to its ascci value in the byteland country ascii co

How do you access the values within an array? - Arrays comprise a number of elements, which depends on the size you assigned it during variable declaration. - Every element

Develop Diablo 2 LOD 1.13d Dupe Method for Closed Battle.net This hack is for diablo 2 lord of destruction The program must work on all realms, all cores, all ladders (4x rea

Operation on list - c++ program: Write a program in c to Insert value on list and list iteration. typedef struct item *node_ptr; struct item {                   int e

Question : (a) (i) What is a structure member in C? What is the relationship between a structure member and the structure? (ii) How can structure variables be declared in C?

Tell what the derived class inherits or doesn't inherit? A: Inherits: - All data member defined in the parent class (even though such members might not always be accessible