1.

What is the output of this program?
#include <iostream>
using namespace std;
class BaseClass
{
int A;
public:
void setA(int num1)
{
A = num1;
}
void showA()
{
cout << A < }
};
class DerivedClass : private BaseClass
{
int B;
public:
void setAB(int num1, int num2)
{
setA(num1);
B = num2;
}
void showAB()
{
showA();
cout << B << ' n';
}
};
int main()
{
DerivedClass object;
object.setAB(15, 25);
object.showAB();
return 0;
}

A. 15
B. 25
C. 25 15
D. 15 25
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs