[code]"Please use code tags"[/code]
Your code shall not compile. (int main(), the references should be const)
And have several bad practices (dynamic allocation abuse, bad memory handling, casting, obfuscation)
As to why x::a is 2.
1 2 3 4 5 6
z s1(
y(
x(), //first increase (x::a=1)
h
) //`y' calls its parent copy constructor, no increase
); //`z' calls its parent copy constructor, that calls the default for the base `x'
You could use a step by step run (with a debugger)