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

1.Between 100 and 999 are some numbers that have the characteristics that if you cube the individual digits and sum together you will get the same number. 2. A program that can accept as input an integer and output the equivalent of that number in words.

3 Answers  


What is pointer in c++ with example?

0 Answers  


Why null pointer is used?

0 Answers  


What is the difference between Class and Structure?

40 Answers   HP, IBM, Samsung, TCS,


Difference between Operator overloading and Functional overloading?

10 Answers   HP,


When does the c++ compiler create temporary variables?

0 Answers  


What is the use of static functions?

10 Answers   Symphony,


const char * char * const What is the differnce between the above two?

11 Answers   TCS,


State two differences between C and C++.

0 Answers   Hexaware,


State the difference between delete and delete[].

0 Answers  


What is Object Oriented programming.what is the difference between C++ and C?

8 Answers   Infosys,


Implement stack operations with pointers with appropriate exception checks.

0 Answers   Huawei,


Categories