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
What are the three main types of variables?
Why do we need polymorphism in c#?
Describe these concepts: Polymorphism, Inheritance and Abstraction.
What is the types of inheritance?
What is destructor in oop?
write knight tour problem which is present in datastructure
What is oops and its features?
Can you inherit a private class?
When not to use object oriented programming?
What is stream in oop?
What does <> mean pseudocode?
What is use of overloading?
What are the 3 pillars of oop?
Why oops is important?
What is meant by oops concept?