why the argument is passed by reference to a copy
constructor?example?

Answers were Sorted based on User's Feedback



why the argument is passed by reference to a copy constructor?example?..

Answer / ashponni

Compliler runs out of memory,by creating copies of object

Is This Answer Correct ?    10 Yes 0 No

why the argument is passed by reference to a copy constructor?example?..

Answer / 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

More OOPS Interview Questions

polymorphism means?

6 Answers   BFL,


What is polymorphism explain?

0 Answers  


Can anyone please explain runtime polymorphism with a real time example??at what ciscumstances we go for it??

1 Answers  


What is class in oop with example?

0 Answers  


what is difference between thread and programme.

1 Answers   NCC,






What does and I oop mean in text?

0 Answers  


How do you define social class?

0 Answers  


what is namespace? what are the uses of namespace?

1 Answers  


What is use of overloading?

0 Answers  


the difference between new and malloc

5 Answers   Siemens,


What are the benefits of oop?

0 Answers  


write a progra in c++ using class & object to find out wheather a given no. is prim or not.

2 Answers  


Categories