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 is for loop and its syntax?
What are constructors in oop?
Can enum be null?
What is multilevel inheritance in oop?
What is polymorphism oop?
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).
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
What is a class in oop?
What is the purpose of enum?
How to hide the base class functionality in Inheritance?
What is encapsulation with real life example?
2. Give the different notations for the class.\
Can you inherit a private class?
What is overloading in oop?
write a program that takes input in digits and display the result in words from 1 to 1000