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
Can static class have constructor?
Can bst contain duplicates?
What is oops in simple words?
Explain virtual inheritance?
What is encapsulation in simple terms?
Can private class be inherited?
Is html an oop?
write string class as your own class in java without using any built-in function
What are the 4 pillars of oop?
Which method cannot be overridden?
What is difference between multiple inheritance and multilevel inheritance?
What is polymorphism programming?
How to hide the base class functionality in Inheritance?
What is oops with example?
What is coupling in oop?