有如下程序: #include <iostream.h> class x { protected: int a; public: x() { a=1; } }; class x1 : virtual public x { public: x1() { a+=1; cout<<a; } }; class x2 : virtual public x { public:x2(){a+=2;cout<<a; } }; class y : public xl,public x2 { public: y() {cout<<a<<end1; } }; int main() {y obj;return O; } 该程序运行后的输出结果是( )。
A.1
B.123
C.242
D.244