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 type of loop is a for loop?
What are the 3 pillars of oop?
What is class encapsulation?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What are the two different types of polymorphism?
Why oops is important?
What is difference between pop and oop?
What is oops with example?
any one please tell me the purpose of operator overloading
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
What is oops in simple words?
How do you use inheritance in unity?
What is stream in oop?
What is cohesion in oop?
What is static in oop?