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
Why do we need runtime polymorphism in c++?
What is the benefit of encapsulation?
What is the type of 'this' pointer? When does it get created?
Why main function is special in c++?
What do you understand by a pure virtual member function?
Describe the advantage of an external iterator.
What is the difference between a type-specific template friend class and a general template friend class?
How can I learn c++ easily?
Is oops and c++ same?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
What is a .h file c++?
What is a node class in c++?
Explain the auto storage classes in c++.
What return value must conversion operators have in their declaration?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300