Question:Consider the sample code given below and answer the question that follows.
class Person
{
    string name;
    int age;
    Person *spouse;
public:
    Person(string sName);
    Person(string sName, int nAge);
    Person(const Person& p);

    Copy(Person *p);
    Copy(const Person &p);
    SetSpouse(Person *s);
};
Which one of the following are declarations for a copy constructor? 

A Person(string sName); 

B Person(string sName, int nAge); 

C Copy(Person *p); 

D Person(const Person &p); 

E Copy(const Person &p)? 

+ Answer
+ Report
Total Preview: 31965

Copyright © 2024. Powered by Intellect Software Ltd