#include &lt;iostream&gt;    #include &lt;cmath&gt;    using namespace std;    class Complex    &#123;        private:        double real;        double imag;        public:        Complex&#40;double r = 0.0, double i = 0.0&#41; : real&#40;r&#41;, imag&#40;i&#41;        &#123;&#125;        double mag&#40;&#41;        &#123;              return getMag&#40;&#41;;        &#125;        operator double &#40;&#41;        &#123;            return getMag&#40;&#41;;        &#125;        private:        double getMag&#40;&#41;        &#123;            return sqrt&#40;real * real + imag * imag&#41;;        &#125;    &#125;;    int main&#40;&#41;    &#123;        Complex com&#40;3.0, 4.0&#41;;        cout &lt;&lt; com.mag&#40;&#41;;        cout &lt;&lt; com;        return 0    &#125;
A. 5 5
B. 4 5
C. 6 6
D. None of the mentioned
Answer:A
#include &lt;iostream&gt;    #include &lt;cmath&gt;    using namespace std;    class Complex    &#123;        private:        double real;        double imag;        public:        Complex&#40;double r = 0.0, double i = 0.0&#41; : real&#40;r&#41;, imag&#40;i&#41;        &#123;&#125;        double mag&#40;&#41;        &#123;              return getMag&#40;&#41;;        &#125;        operator double &#40;&#41;        &#123;            return getMag&#40;&#41;;        &#125;        private:        double getMag&#40;&#41;        &#123;            return sqrt&#40;real * real + imag * imag&#41;;        &#125;    &#125;;    int main&#40;&#41;    &#123;        Complex com&#40;3.0, 4.0&#41;;        cout &lt;&lt; com.mag&#40;&#41;;        cout &lt;&lt; com;        return 0    &#125;
A. 5 5 B. 4 5 C. 6 6 D. None of the mentioned