GeekInterview.com
Series: Subject: Topic:
Question: 179 of 268

what is difference between copy constructor and constructor?

Asked by: suryateja03 | Member Since Jun-2006 | Asked on: Jul 24th, 2006

View all questions by suryateja03

Showing Answers 1 - 2 of 2 Answers
Somsubhra Maity

Answered On : Jul 30th, 2006

a copy constractor can accept a reference to its own class,where the simple constractor can't do the job.

  
Login to rate this answer.
Anurag Verma

Answered On : Aug 7th, 2006

Constructor is called when an object is created.Copy constructor is called when the copy of an object is made. For e.g. passing parameter to function by value, function returning by value. Copy constructor takes the parameter as const reference to the object.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.