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

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

1 Answers  


How would you stop a class from class from being derived or inherited.

18 Answers   Ness Technologies,


why we call c++ is object oriented lanaguage

7 Answers   HCL,


What is encapsulation in oops?

1 Answers  


Can you explain polymorphism?

1 Answers  


What are the 5 oop principles?

1 Answers  


Why interface is used?

1 Answers  


tel me oops defination in single line

2 Answers  


What is difference between data abstraction and encapsulation?

1 Answers  


What is oops in programming?

1 Answers  


How can we use the preprocessor #if and #elseif.

2 Answers  


Why we use classes in oop?

1 Answers  


Categories