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

what are the ways in which a constructors can be called?

2 Answers   TCS,


what is the difference between javap and jad utility

1 Answers   Wipro,


What is this interview room ? Is it a class or an object.

3 Answers   CybAge, NSN, Wipro,


How to reverse a sentence in c program ex: ram is a good boy answer: boy good a is ram

0 Answers   IBM,


What are callback functions in c++

1 Answers   SoftTech,






what is a virtual class?

5 Answers   Cap Gemini, IBM, Infosys, Trinity Technologies,


what is costructor?

1 Answers  


In c++ there is only virtual destructors, no constructors. Why?

4 Answers   IBM, Polaris,


What is the purpose of polymorphism?

0 Answers  


What does and I oop and sksksk mean?

0 Answers  


what is namespace? what are the uses of namespace?

1 Answers  


class type to basic type conversion

0 Answers  


Categories