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

Do you know about multiple inheritance?

0 Answers   Motorola,


Can java compiler skips any statement during compilation time?

0 Answers  


What is the real time example of encapsulation?

0 Answers  


how do you handle yourself when you feel the wald is aganist you

2 Answers  


What is static modifier?

0 Answers  






what is code for call by value and call by reference?

1 Answers  


OOP'S advantages of inheritance include:

1 Answers   Infosys,


why we call c++ is object oriented lanaguage

7 Answers   HCL,


explain the concepts of oops?

1 Answers  


what is SPL in c++.

1 Answers  


Write a program to reverse a string using recursive function?

0 Answers   TCS,


What does sksksk mean in text slang?

0 Answers  


Categories