If Two Classes Have Exactly Same Data Members And Member #138
If two classes have exactly same data members and member function and only they differ by class name. Can copy constructor be used to initialize one class object with another class object?
This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 Constructors and Destructors - OOPs MCQ: Copy Constructor - Quiz No.1.
If two classes have exactly same data members and member function and only they differ by class name. Can copy constructor be used to initialize one class object with another class object?
Yes, possible
Yes, because the members are same
No, not possible
No, but possible if constructor is also same