Search Interview Questions
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.
|
|||||||||||
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. Source: CoolInterview.com If you have the better answer, then send it to us. We will display your answer after the approval Rules to Post Answers in CoolInterview.com:-
|
Related Questions | ||
What is a conversion constructor? |
|
|
What is a default constructor? |
|
|
How does throwing and catching exceptions differ from using setjmp and longjmp? |
|
|
How many ways are there to initialize an int with a constant? |
|
|
What are the differences between a C++ struct and C++ class? |
|
|
Explain the scope resolution operator. |
|
|
How do you link a C++ program to C functions? |
|
|
How do I initialize a pointer to a function? |
|
|
Will the following program execute? void main() { void *vptr = (void *) malloc(sizeof(void)); vptr++; } |
|
|
Are there any new intrinsic (built-in) data types? |
|
|
What problem does the namespace feature solve? |
|
|
Describe run-time type identification. |
|
|
What is the Standard Template Library (STL)? |
|
|
What is the need for a Virtual Destructor ? |
|
|
Assignment Operator - What is the diffrence between a "assignment operator" and a "copy constructor"? |
|
|
Write a program that ask for user input from 5 to 9 then calculate the average |
|
|
What are the defining traits of an object-oriented language? |
|
|
What methods can be overridden in Java? |
|
|
In C++, what is the difference between method overloading and method overriding? |
|
|
What is a modifier? }; |
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All C++ Interview Questions & Answers - Exam Mode / Learning Mode
India News Network |