#include &lt;iostream&gt;    using namespace std;    class Base    &#123;        public:        virtual void print&#40;&#41; const = 0;    &#125;;    class DerivedOne : virtual public Base    &#123;        public:        void print&#40;&#41; const        &#123;            cout &lt;&lt; &quot;1&quot;;        &#125;    &#125;;    class DerivedTwo : virtual public Base    &#123;        public:        void print&#40;&#41; const        &#123;            cout &lt;&lt; &quot;2&quot;;        &#125;    &#125;;    class Multiple : public DerivedOne, DerivedTwo    &#123;        public:        void print&#40;&#41; const        &#123;            DerivedTwo::print&#40;&#41;;        &#125;    &#125;;    int main&#40;&#41;    &#123;        Multiple both;        DerivedOne one;        DerivedTwo two;        Base *array&#91; 3 &#93;;        array&#91; 0 &#93; = &amp;both;        array&#91; 1 &#93; = &amp;one;        array&#91; 2 &#93; = &amp;two;        for &#40; int i = 0; i &lt; 3; i++ &#41;        array&#91; i &#93; -&gt; print&#40;&#41;;        return 0;    &#125;
A. 121
B. 212
C. 12
D. None of the mentioned
Answer:A
#include &lt;iostream&gt;    using namespace std;    class Base    &#123;        public:        virtual void print&#40;&#41; const = 0;    &#125;;    class DerivedOne : virtual public Base    &#123;        public:        void print&#40;&#41; const        &#123;            cout &lt;&lt; &quot;1&quot;;        &#125;    &#125;;    class DerivedTwo : virtual public Base    &#123;        public:        void print&#40;&#41; const        &#123;            cout &lt;&lt; &quot;2&quot;;        &#125;    &#125;;    class Multiple : public DerivedOne, DerivedTwo    &#123;        public:        void print&#40;&#41; const        &#123;            DerivedTwo::print&#40;&#41;;        &#125;    &#125;;    int main&#40;&#41;    &#123;        Multiple both;        DerivedOne one;        DerivedTwo two;        Base *array&#91; 3 &#93;;        array&#91; 0 &#93; = &amp;both;        array&#91; 1 &#93; = &amp;one;        array&#91; 2 &#93; = &amp;two;        for &#40; int i = 0; i &lt; 3; i++ &#41;        array&#91; i &#93; -&gt; print&#40;&#41;;        return 0;    &#125;
A. 121 B. 212 C. 12 D. None of the mentioned
Explanation:In this program, We are executing these based on the condition given in array. So it is printing as 212.