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 linked list using c++ with an example?

627


What are protected members in c++?

613


Where are setjmp and longjmp used in c++?

609


What do you understand by pure virtual function? Write about its use?

575


What is c++ manipulator?

551






What are the advantages of using friend classes?

621


what you know about c++?

656


What is flush programming?

566


How to declare a pointer to an array of integers?

641


If I is an integer variable, which is faster ++i or i++?

586


What is a forward referencing and when should it be used?

573


You run a shell on unix system. How would you tell which shell are you running?

653


How do I get good at c++ programming?

592


What are manipulators used for?

601


Is it possible for a member function to use delete this?

562