1.

What will be the out of the following program?

#include<iostream.h> class BixBase
{ public: int x, y; public: BixBase(int xx = 0, int yy = 0) { x = xx; y = yy; } };
class BixDerived : public BixBase
{ private: BixBase objBase; public: BixDerived(int xx, int yy) : BixBase(xx), objBase(yy) { cout << this->x << " " << this->y << " " << objBase.x << " " << objBase.y << " "; } ~BixDerived() { }
};
int main()
{ BixDerived objDev(11, 22); return 0;
}

A. 11 22 0 0
B. 11 0 0 22
C. 11 0 22 0
D. 11 22 11 22
E. The program will report compile time error.
Answer» D. 11 22 11 22


Discussion

No Comment Found

Related MCQs