#include &lt;iostream&gt;    #include &lt;exception&gt;    using namespace std;    void myunexpected &#40;&#41;     &#123;        cout &lt;&lt; &quot;unexpected handler called\n&quot;;        throw;    &#125;    void myfunction &#40;&#41; throw &#40;int,bad_exception&#41;     &#123;        throw 'x';    &#125;    int main &#40;void&#41;    &#123;        set_unexpected &#40;myunexpected&#41;;        try         &#123;            myfunction&#40;&#41;;        &#125;            catch &#40;int&#41;         &#123;             cout &lt;&lt; &quot;caught int\n&quot;;         &#125;        catch &#40;bad_exception be&#41;         &#123;             cout &lt;&lt; &quot;caught bad_exception\n&quot;;         &#125;        catch &#40;...&#41;         &#123;             cout &lt;&lt; &quot;caught other exception \n&quot;;         &#125;        return 0;    &#125;
A. unexpected handler called
B. caught bad_exception
C. caught other exception
D. both a & b
Answer:A
#include &lt;iostream&gt;    #include &lt;exception&gt;    using namespace std;    void myunexpected &#40;&#41;     &#123;        cout &lt;&lt; &quot;unexpected handler called\n&quot;;        throw;    &#125;    void myfunction &#40;&#41; throw &#40;int,bad_exception&#41;     &#123;        throw 'x';    &#125;    int main &#40;void&#41;    &#123;        set_unexpected &#40;myunexpected&#41;;        try         &#123;            myfunction&#40;&#41;;        &#125;            catch &#40;int&#41;         &#123;             cout &lt;&lt; &quot;caught int\n&quot;;         &#125;        catch &#40;bad_exception be&#41;         &#123;             cout &lt;&lt; &quot;caught bad_exception\n&quot;;         &#125;        catch &#40;...&#41;         &#123;             cout &lt;&lt; &quot;caught other exception \n&quot;;         &#125;        return 0;    &#125;
A. unexpected handler called B. caught bad_exception C. caught other exception D. both a & b
Explanation:In this program, We are calling set_unexpected and myfunction, So it is printing the output as the given.