InterviewSolution
Saved Bookmarks
| 1. |
What is the syntax of copy constructor?(a) classname (classname &obj){ /*constructor definition*/ }(b) classname (cont classname obj){ /*constructor definition*/ }(c) classname (cont classname &obj){ /*constructor definition*/ }(d) classname (cont &obj){ /*constructor definition*/ }This question was posed to me during an interview.This is a very interesting question from Copy Constructor in portion Constructors and Destructors of Object Oriented Programming |
|
Answer» The correct choice is (c) CLASSNAME (cont classname &obj){ /*constructor definition*/ } |
|