Home » C++ Programming » Objects and Classes

Which of the following statement is correct about the program given below? #include<iostream.h> class CuriousTabBase { int x, y; public: CuriousTabBase(int xx = 10, int yy = 10) { x = xx; y = yy; } void Show() { cout<< x * y << endl; } }; class CuriousTabDerived : public CuriousTabBase { private: CuriousTabBase objBase; public: CuriousTabDerived(int xx, int yy) : CuriousTabBase(xx, yy), objBase(yy, yy) { objBase.Show(); } }; int main() { CuriousTabDerived objDev(10, 20); return 0; }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!