why the argument is passed by reference to a copy
constructor?example?
Answer Posted / vishwa
we are creating a copy of the data , so it is better to get
the data directly from the original object, reference
mechanism provides us above. so we use the reference object
and also to restrict the change to original object we also
pass the reference as const.
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Why oops is important?
what are the realtime excercises in C++?
What is overloading and its types?
what are the ways in which a constructors can be called?
what is the drawback of classical methods in oops?
What is ambiguity in inheritance?
what are the different types of qualifier in java?
If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
Is react oop?
What is object in oop?
What are functions in oop?
Can enum be null?
What is polymorphism in oops with example?
What are the three parts of a simple empty class?
What is the renewal class?