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 the difference between the parameter to a template and the parameter to a function?
What are the uses of typedef in a program?
Why do we use iterators?
Explain the uses of static class data?
What's the order in which the local objects are destructed?
How did c++ get its name?
When there is a global variable and local variable with the same name, how will you access the global variable?
What are c++ redistributables?
What is function overloading c++?
Difference between inline functions and macros?
What is c++ programming language?
What is difference between n and endl in c++?
What are activex and ole?
What is guard code in c++?
What are move semantics?