What is the output of the following C++ code?
#includeusing namespace std;class X{int m;public:X() : m(10){}X(int mm): m(mm){}int getm(){return m;}};class Y : public X{int n;public:Y(int nn) : n(nn) {}int getn() { return n; }};int main(){Y yobj( 100 );cout < yobj.getm()="">< "="" "="">< yobj.getn()=""><>}
using namespace std;
class X
{
int m;
public:
X() : m(10)
}
X(int mm): m(mm)
int getm()
return m;
};
class Y : public X
int n;
Y(int nn) : n(nn) {}
int getn() { return n; }
int main()
Y yobj( 100 );
cout < yobj.getm()="">< "="" "="">< yobj.getn()=""><>
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here