adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    #include <complex>
    using namespace std;
    int main()
    {
        complex<double> c_double(2, 3);
        complex<int> c_int(4, 5);
        c_double *= 2;
        c_double = c_int;
        cout << c_double;
        return 0;
    }

a.

(2, 3)

b.

(4, 5)

c.

(8, 15)

d.

None of the mentioned

Answer: (b).(4, 5)

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?