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?
(a) Yes, possible
(b) Yes, because the members are same
(c) No, not possible
(d) No, but possible if constructor is also same
This question was addressed to me during a job interview.
I want to ask this question from Copy Constructor in chapter Constructors and Destructors of Object Oriented Programming