(1) X x1;
    Clearly X is an abstract class as it has two pure virtual functions. Thus
    it is an error to declare an instance of an abstract class.

(2) Y y1;
    Now this one is not so obvious. It might appear at first that this
    declaration is valid because Y does not have any pure virtual function and
    hence it is not an abstract class and hence you can declare instances of
    that class. But if you see closely, then you will find that even Y is also
    an abstract class. Y is derived from X. X has two pure virtual functions
    f1 and f2. Y inherits both these functions. But it provides a definition
    for f1. However the function f2 is still pure virtual in class Y. And the
    moment a class has at least one pure virtual function, it becomes an
    abstract class. Hence, declaring instances of class Y is illegal.