Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is for loop and its syntax?

1078


What are constructors in oop?

1167


Can enum be null?

1011


What is multilevel inheritance in oop?

1028


What is polymorphism oop?

1055


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).

2148


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2611


What is a class in oop?

1124


What is the purpose of enum?

1007


How to hide the base class functionality in Inheritance?

1133


What is encapsulation with real life example?

1032


2. Give the different notations for the class.\

2156


Can you inherit a private class?

1101


What is overloading in oop?

1000


write a program that takes input in digits and display the result in words from 1 to 1000

2414