Vidyalelo
C++ Programming · Q176

Classes and Objects in C++

Programming · C++ Programming · question 176

Q176

What will be the output of the following C++ code? #include #include using namespace std; int main() complex c1(4.0, 3.0); complex c2(polar(5.0, 0.75)); cout << (c1 += sqrt(c1)) << endl; return 0;

A.
(4.0, 3.0)
B.
(6.12132, 3.70711)
Answer
C.
(5.0, 0.75)
D.
(5.0, 3.75)

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board