-
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;
}
-
- (3.79891,5.11179)
- (5.11179,3.79891)
- 5.11179
- 3.79891
- None of these
Correct Option: A
In this program, we are adding both complex number and finding the square root of it.