What is the output of the following C++ code? #include 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;...


What is the output of the following C++ code?



#include


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;


public:


Y(int nn) : n(nn) {}


int getn() { return n; }


};


int main()


{


Y yobj( 100 );


cout < yobj.getm()="">< "="" "="">< yobj.getn()=""><>


}



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here