What will be printed out as a result of the following code execution?
using namespace std;
static int s;
class b:public a
a *one = new b;
Let's consider order of constructors execution. Constructor A() wiil be called first which make variable s equal to 1, then executes B(), which is make s = 2. When we delete pointer "one", destructor of class B executes, s = 1 and output 1. But destructor ~A() isn't declared as virtual, hence it will not execute..