1.

What is the output of this program?
#include <iostream>
using namespace std;
class Base
{
protected:
int K;
public:
Base(int num1)
{
K = num1;
}
~Base()
{
}
};
class Derived: public Base
{
int L;
public:
Derived(int num1, int num2): Base(num2)
{
L = num1;
}
~Derived()
{
}
void show()
{
cout << K << " " << L << endl;
}
};
int main()
{
Derived object(5, 6);
object.show();
return 0;
}

A. 5
B. 6
C. 5 6
D. 6 5
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs