-
What is the output of this program?
#include <iostream>
using namespace std;
class BaseClass
{
public:
BaseClass(){}
~BaseClass(){}
protected:
private:
};
class DerivedClass:public BaseClass
{
public:
DerivedClass(){}
DerivedClass(){}
private:
protected:
};
int main()
{
cout << "The program exceuted" << endl;
}
-
- Compilation Error
- The program exceuted
- Runtime Error
- Garbage value
- None of these
Correct Option: B
Compilation Error
error: 'DerivedClass::DerivedClass()' cannot be overloaded
error: with 'DerivedClass::DerivedClass()'