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

How is computer programming useful in real life?

788


Can non graphic characters be used and processed in C++?

924


Define pre-condition and post-condition to a member function in c++?

897


Explain queue. How it can be implemented?

898


How can you link a c++ program to c functions?

856


What is tellg () in c++?

1035


Which should be more useful: the protected and public virtuals?

783


What is the oldest programming language?

782


Explain how would you handle a situation where you cannot call the destructor of a local explicitly?

748


What is the difference between an array and a list?

784


Show the declaration for a pointer to function returning long and taking an integer parameter.

802


Is c++ an oop?

822


List down the guideline that should be followed while using friend function.

824


What is the full form of ios?

762


Explain public, protected, private in c++?

764