Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between new() and malloc()?

Answers were Sorted based on User's Feedback



What is the difference between new() and malloc()?..

Answer / nashiinformaticssolutions

• new: Calls constructor, returns an object of the correct type.
• malloc(): Does not call constructor, returns void*.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between new() and malloc()?..

Answer / nashiinformaticssolutions

o new initializes the object and calls its constructor.
o malloc allocates memory but does not call constructors.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between new() and malloc()?..

Answer / glibwaresoftsolutions

• new: Calls constructor, returns an object of the correct type.
• malloc(): Does not call constructor, returns void*.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between new() and malloc()?..

Answer / hr@tgksolutions.com

• new: Calls constructor, returns an object of the correct type.
• malloc(): Does not call constructor, returns void*.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is new in c++?

0 Answers  


If there are 1 to 100 Numbers in array of 101 elements. Which is the easy way to find repeated number?

2 Answers   Persistent,


What is pointer to array in c++?

0 Answers  


Why is c++ awesome?

0 Answers  


What are 2 ways of exporting a function from a dll?

0 Answers  


How to declare a function pointer?

0 Answers  


throw Can constructors exceptions?

1 Answers  


What is size of a object of following class? class Foo { public: void foo(){} }

2 Answers   CA,


Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?

0 Answers  


What is the use of endl in c++ give an example?

0 Answers  


Why do we use the using declaration?

0 Answers  


Explain bubble sorting.

0 Answers  


Categories