What is the Diffrence between a "assignment operator" and a
"copy constructor"?
Answer Posted / kishore
Copy constructors are used during class object
initialization and assignment operators are invoked during
object assignment.
XYZ c;
XYZ Obj = c; -> invoke copy constructor
XYZ d;
d = c; -> invoke assignment operator
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is functions syntax in c++?
What is setw manipulator in c++?
Can create new c++ operators?
What is increment operator in c++?
What is #include iostream?
What are c++ stream classes?
What do you mean by function pointer?
What is this pointer in c++?
What are the advantages of c++?
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
Write about c++ storage classes?
Are c and c++ similar?
What are pointer-to-members? Explain.
What is helper in c++?
How will you call C functions from C ++ and vice-versa?