C Interview Questions and Answers
Question: What is the difference between a copy constructor and an overloaded assignment operator?Answer:A copy constructor constructs a new object by using the content of the argument object. An overloaded assignment operator assigns the contents of an existing object to another existing object of the same class. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is C++?
- What is function overloading and operator overloading?
- How do you find out if a linked-list has an end? (i.e. the list is not a cycle)
- What is the difference between declaration and definition?
- What is the difference between realloc() and free()?