adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    #include <complex>
    using namespace std;
    int main()
    {
        complex<double> c1(4.0, 3.0);
        complex<float> c2(polar(5.0, 0.75));
        cout  << (c1 += sqrt(c1)) << endl;
        return 0;
    }

a.

(4.0, 3.0)

b.

(6.12132, 3.70711)

c.

(5.0, 0.75)

d.

None of the mentioned

Answer: (b).(6.12132, 3.70711)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?