#include &lt;iostream&gt;    using namespace std;    class BaseClass     &#123;        int i;        public:        void setInt&#40;int n&#41;;        int getInt&#40;&#41;;    &#125;;    class DerivedClass : public BaseClass    &#123;        int j;        public:        void setJ&#40;int n&#41;;        int mul&#40;&#41;;    &#125;;    void BaseClass::setInt&#40;int n&#41;    &#123;        i = n;    &#125;    int BaseClass::getInt&#40;&#41;    &#123;        return i;    &#125;    void DerivedClass::setJ&#40;int n&#41;    &#123;        j = n;    &#125;    int DerivedClass::mul&#40;&#41;    &#123;        return j * getInt&#40;&#41;;    &#125;    int main&#40;&#41;    &#123;        DerivedClass ob;        ob.setInt&#40;10&#41;;               ob.setJ&#40;4&#41;;                  cout &lt;&lt; ob.mul&#40;&#41;;            return 0;    &#125;
A. 10
B. 4
C. 40
D. None of the mentioned
Answer:A
#include &lt;iostream&gt;    using namespace std;    class BaseClass     &#123;        int i;        public:        void setInt&#40;int n&#41;;        int getInt&#40;&#41;;    &#125;;    class DerivedClass : public BaseClass    &#123;        int j;        public:        void setJ&#40;int n&#41;;        int mul&#40;&#41;;    &#125;;    void BaseClass::setInt&#40;int n&#41;    &#123;        i = n;    &#125;    int BaseClass::getInt&#40;&#41;    &#123;        return i;    &#125;    void DerivedClass::setJ&#40;int n&#41;    &#123;        j = n;    &#125;    int DerivedClass::mul&#40;&#41;    &#123;        return j * getInt&#40;&#41;;    &#125;    int main&#40;&#41;    &#123;        DerivedClass ob;        ob.setInt&#40;10&#41;;               ob.setJ&#40;4&#41;;                  cout &lt;&lt; ob.mul&#40;&#41;;            return 0;    &#125;
A. 10 B. 4 C. 40 D. None of the mentioned
Explanation:In this program, We are multiplying the value 10 and 4 by using inheritance.