#include &lt;typeinfo&gt;    #include &lt;iostream&gt;    using namespace std;    class Myshape    &#123;        public:        virtual void myvirtualfunc&#40;&#41; const &#123;&#125;    &#125;;    class mytriangle: public Myshape    &#123;        public:        virtual void myvirtualfunc&#40;&#41; const        &#123;           &#125;;    &#125;;    int main&#40;&#41;    &#123;        Myshape Myshape_instance;        Myshape &amp;ref_Myshape = Myshape_instance;        try         &#123;            mytriangle &amp;ref_mytriangle = dynamic_cast&lt;mytriangle&amp;&gt;&#40;ref_Myshape&#41;;        &#125;        catch &#40;bad_cast&#41;        &#123;            cout &lt;&lt; &quot;Can't do the dynamic_cast lor!!!&quot; &lt;&lt; endl;            cout &lt;&lt; &quot;Caught: bad_cast exception. Myshape is not mytriangle.\n&quot;;        &#125;        return 0;    &#125;
A. Can’t do the dynamic_cast lor!!!
B. Caught: bad_cast exception. Myshape is not mytriangle.
C. both a & b
D. none of the mentioned
Answer:A
#include &lt;typeinfo&gt;    #include &lt;iostream&gt;    using namespace std;    class Myshape    &#123;        public:        virtual void myvirtualfunc&#40;&#41; const &#123;&#125;    &#125;;    class mytriangle: public Myshape    &#123;        public:        virtual void myvirtualfunc&#40;&#41; const        &#123;           &#125;;    &#125;;    int main&#40;&#41;    &#123;        Myshape Myshape_instance;        Myshape &amp;ref_Myshape = Myshape_instance;        try         &#123;            mytriangle &amp;ref_mytriangle = dynamic_cast&lt;mytriangle&amp;&gt;&#40;ref_Myshape&#41;;        &#125;        catch &#40;bad_cast&#41;        &#123;            cout &lt;&lt; &quot;Can't do the dynamic_cast lor!!!&quot; &lt;&lt; endl;            cout &lt;&lt; &quot;Caught: bad_cast exception. Myshape is not mytriangle.\n&quot;;        &#125;        return 0;    &#125;
A. Can’t do the dynamic_cast lor!!! B. Caught: bad_cast exception. Myshape is not mytriangle. C. both a & b D. none of the mentioned
Explanation:As we can’t able to create the dynamic instance for the triangle, So it is arising an exception.