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
Can we delete this pointer in c++?
What is the full form nasa?
Is swift faster than c++?
How do you define/declare constants in c++?
what is c++
How new/delete differs from malloc()/free?
Refer to a name of class or function that is defined within a namespace?
Name four predefined macros.
What are the rules for naming an identifier?
Describe about storage allocation and scope of global, extern, static, local and register variables?
What is a multiset c++?
What is the rule of three?
Write syntax to define friend functions in C++.
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
Is c++ the hardest language?