1.

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

A. (3.79891,5.11179)
B. (5.11179,3.79891)
C. 5.11179
D. 3.79891
E. None of these
Answer» B. (5.11179,3.79891)


Discussion

No Comment Found

Related MCQs