What is the output of the following code ?
class C {
public:
C() { cout << "Con: C" << endl; }
~C() { cout << "Des: C" << endl; }
};
class B : public C {
public:
B() { cout << "Con: B" << endl; }
~B() { cout << "Des: B" << endl; }
};
class A : public B {
public:
A() { cout << "Con: A" << endl; }
~A() { cout << "Des: A" << endl; }
};
int main(){
A* obj = new A();
delete obj;
}
Newlines are indicated by " -- "