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

Can static class have constructor?

983


Can bst contain duplicates?

1142


What is oops in simple words?

1033


Explain virtual inheritance?

1125


What is encapsulation in simple terms?

974


Can private class be inherited?

1119


Is html an oop?

1000


write string class as your own class in java without using any built-in function

2442


What are the 4 pillars of oop?

1089


Which method cannot be overridden?

1015


What is difference between multiple inheritance and multilevel inheritance?

1103


What is polymorphism programming?

1070


How to hide the base class functionality in Inheritance?

1089


What is oops with example?

996


What is coupling in oop?

968