What is the Diffrence between a "assignment operator" and a
"copy constructor"?
Answer Posted / dee
assignment operator copies the values of one object to
another of the same class.It will excute only when the
right side of the variable is object and two sides are not
equal.It does shallow copy
Copy constructor craetes the object if its not existing and
copies the values of another object of the same class and
it does the deep copy.
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the return value of the insertion operator?
What is ios flag in c++?
How is objective c different from c++?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
What are signs of manipulation?
What are associate containers?
What is meant by the term name mangling in c++?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
Is c++ slower than c?
What are compilers in c++?
what are Access specifiers in C++ class? What are the types?
What is dynamic and static typing?
Can constructor be static in c++?
What is prototype in c++ with example?
What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero