1.

What is the output of this program?
#include <iostream>
#include <complex>
using namespace std;
int main()
{
complex<double> CompNum1(2.0,4.0);
cout << "Complex Number: " << CompNum1;
complex<float> CompNum2(polar(3.0,0.25));
cout << CompNum1 + complex<double>(CompNum2.real(),CompNum2.imag());
return 0;
}

A. Complex Number: (4.90674,4.74221)(2,4)
B. Compilation Error
C. Runtime Error
D. Complex Number: (2,4)(4.90674,4.74221)
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs