CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
Question :
What is the difference between operator new and the new operator?


Category C++ Interview Questions
Rating (3.0) By 2 users
Added on 7/19/2006
Views 2773
Rate it!
Answers:

This is what happens when you create a new object: 1. the memory for the object is allocated using "operator new". 2. the costructor of the class is invoked to properly initialize this memory. As you can see, the new operator does both 1 and 2. The operator new merely allocates memory, it does not initialize it. where as the new operator also initializes it properly by calling the constructor.





If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
How can you force instantiation of a template?

View Answer
What is an algorithm (in terms of the STL/C++ standard library)?


View Answer
What is the output of printf ("%d")


View Answer
What will happen if I say delete this


View Answer
Difference between "C structure" and "C++ structure".


View Answer
What is the difference between "overloading" and "overriding"?


View Answer
Explain the need for "Virtual Destructor".


View Answer
What are the different types of polymorphism?



View Answer
What are Virtual Functions? How to implement virtual functions in "C"


View Answer
What are the different types of Storage classes?

View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C++ Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/6134/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

1.12