# ISRO-2013-75

2.6k views

What is the right way to declare a copy constructor of a class if the name of the class is MyClass?

1. MyClass (constant MyClass * arg)
2. MyClass (constant MyClass & arg)
3. MyClass (MyClass arg)
4. MyClass (MyClass * arg)

it should be B (with a const keyword instead of constant )as reference of arg is passed in copy constructor

selected by
2
@sanjay :is there any book of Java that contain conceptual questions of Java.

Like test your c skill for c language
In the question, a particular language is not mentioned so option B and C both are correct.

In Java copy constructor: MyClass(MyClass arg)

But In C++ it is :  MyClass (constant MyClass & arg)

## Related questions

1
2.9k views
In graphics, the number of vanishing points depends on The number of axes cut by the projection plane The center of projection The number of axes which are parallel to the projection plane The perspective projections of any set of parallel lines that are not parallel to the projection plane
If a program $P$ calls two subprograms $P1$ and $P2$ and $P1$ can fail $50$% of the time and $P2$ can fail $40$% of the time, what is the failure rate of program $P$? $50$% $60$% $70$% $10$%