#include &lt;iostream&gt;    using namespace std;    class sample    &#123;        public:        sample&#40;int i&#41; : m_i&#40;i&#41; &#123; &#125;        public:        int operator&#40;&#41;&#40;int i = 0&#41; const         &#123;             return m_i + i;         &#125;        operator int &#40;&#41; const           &#123;             return m_i;         &#125;        private:        int m_i;        friend int g&#40;const sample&amp;&#41;;    &#125;;    int f&#40;char c&#41;    &#123;        return c;    &#125;    int main&#40;&#41;    &#123;        sample f&#40;2&#41;;        cout &lt;&lt; f&#40;2&#41;;        return 0;    &#125;
A. 3
B. 4
C. 5
D. None of the mentioned
Answer:A
#include &lt;iostream&gt;    using namespace std;    class sample    &#123;        public:        sample&#40;int i&#41; : m_i&#40;i&#41; &#123; &#125;        public:        int operator&#40;&#41;&#40;int i = 0&#41; const         &#123;             return m_i + i;         &#125;        operator int &#40;&#41; const           &#123;             return m_i;         &#125;        private:        int m_i;        friend int g&#40;const sample&amp;&#41;;    &#125;;    int f&#40;char c&#41;    &#123;        return c;    &#125;    int main&#40;&#41;    &#123;        sample f&#40;2&#41;;        cout &lt;&lt; f&#40;2&#41;;        return 0;    &#125;
A. 3 B. 4 C. 5 D. None of the mentioned
Explanation:In this program, we are adding its value with it itself, So only we got the output as 4.