If we have this code:
class A
{
public:
A() { cout << 1; }
~A() { cout << 2; }
};
class B : public A
{
public:
B() { cout << 3; }
~B() { cout << 4; }
};
And we create an object from class B, what will be the result?
A. Other
B. I don't know
C. 3412
D. 3142
E. 3124
F. 1342
G. 1324
H. 1234
class A
{
public:
A() { cout << 1; }
~A() { cout << 2; }
};
class B : public A
{
public:
B() { cout << 3; }
~B() { cout << 4; }
};
And we create an object from class B, what will be the result?
A. Other
B. I don't know
C. 3412
D. 3142
E. 3124
F. 1342
G. 1324
H. 1234