What is the difference between a copy constructor and an
overloaded assignment operator?

Answer Posted / vsinghal

In case of copy constructor when the object goes out of
scope its destructor will be called while in case of
assignment operator no destructor will be called.

Is This Answer Correct ?    12 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are the sizes and ranges of the basic c++ data types?

625


How do we implement inheritance in c++?

569


Explain the concept of dynamic allocation of memory?

608


What does the ios::ate argument do?

647


Using a smart pointer can we iterate through a container?

546






Which is better c++ or java?

548


Explain the concept of friend function in c++?

590


What is a driver program?

616


How many keywords are used in c++?

545


What is polymorphism & list its types in c++?

604


Define pointers?

589


What is the latest version on c++?

668


What are the data types in c++?

504


What are the advantage of using register variables?

625


Explain stack unwinding.

621