#include &lt;iostream&gt;    using namespace std;    class poly    &#123;        protected:        int width, height;        public:        void set_values&#40;int a, int b&#41;        &#123;            width = a; height = b;        &#125;    &#125;;    class Coutput    &#123;        public:        void output&#40;int i&#41;;    &#125;;    void Coutput::output&#40;int i&#41;    &#123;        cout &lt;&lt; i;    &#125;    class rect:public poly, public Coutput    &#123;        public:        int area&#40;&#41;        &#123;            return&#40;width * height&#41;;        &#125;    &#125;;    class tri:public poly, public Coutput    &#123;        public:        int area&#40;&#41;        &#123;            return&#40;width * height / 2&#41;;        &#125;    &#125;;    int main&#40;&#41;    &#123;        rect rect;        tri trgl;        rect.set_values&#40;3, 4&#41;;        trgl.set_values&#40;4, 5&#41;;        rect.output&#40;rect.area&#40;&#41;&#41;;        trgl.output&#40;trgl.area&#40;&#41;&#41;;        return 0;    &#125;
A. 1212
B. 1210
C. 1010
D. none of the mentioned
Answer:A
#include &lt;iostream&gt;    using namespace std;    class poly    &#123;        protected:        int width, height;        public:        void set_values&#40;int a, int b&#41;        &#123;            width = a; height = b;        &#125;    &#125;;    class Coutput    &#123;        public:        void output&#40;int i&#41;;    &#125;;    void Coutput::output&#40;int i&#41;    &#123;        cout &lt;&lt; i;    &#125;    class rect:public poly, public Coutput    &#123;        public:        int area&#40;&#41;        &#123;            return&#40;width * height&#41;;        &#125;    &#125;;    class tri:public poly, public Coutput    &#123;        public:        int area&#40;&#41;        &#123;            return&#40;width * height / 2&#41;;        &#125;    &#125;;    int main&#40;&#41;    &#123;        rect rect;        tri trgl;        rect.set_values&#40;3, 4&#41;;        trgl.set_values&#40;4, 5&#41;;        rect.output&#40;rect.area&#40;&#41;&#41;;        trgl.output&#40;trgl.area&#40;&#41;&#41;;        return 0;    &#125;
A. 1212 B. 1210 C. 1010 D. none of the mentioned
Explanation:In this program, We are calculating the area of rectangle and