(a) What is a copy constructor ? What are the advantages of a copy co…
Previous year question for Object Oriented Programming Using C++.
Question
(a) What is a copy constructor ? What are the advantages of a copy constructor ? Give examples.
(b) Write a class employee with two functions get data and put data to read the name and number of employees and display them respectively. Drive two classes one manager and other scientist. In manager class add one more variable title. In scientist class add more variable publication and display them.
- Year: 2018
- Subject: Object Oriented Programming Using C++
Related pages
More PYQs on Constructor and Destructor Functions
- (a) Create a class time that has separate int member data for hour, minutes and seconds. One constructor should initialize this data to 0 and another should in…
- (a) Write 'C++' class for the following : To represent two-dimensional point $(x, y)$, class should contain all different constructors and methods to print poi…