Cpp Programming Quiz 110 – Which of the following statement is correct about the program given below?
#include
class BixBase
{
int x, y;
public:
BixBase(int xx = 10, int yy = 10)
{
x = xx;
y = yy;
}
void Show()
{
cout<< x * y << endl;
}
};
class BixDerived : public BixBase
{
private:
BixBase objBase;
public:
BixDerived(int xx, int yy) : BixBase(xx, yy), objBase(yy, yy)
{
objBase.Show();
}
};
int main()
{
BixDerived objDev(10, 20);
return 0;
}
[A].The program will print the output 100.
[B].The program will print the output 200.
[C].The program will print the output 400.
[D].The program will print the output Garbage-value.
Answer: Option C