Vidyalelo
C++ Programming · Q37

Classes and Objects in C++

Programming · C++ Programming · question 37

Q37

What will be the output of the following C++ code? #include #include using namespace std; int main () complex mycomplex (20.0, 2.0); cout << imag(mycomplex) << endl; return 0;

A.
2
Answer
B.
20
C.
40
D.
30

Answer: Option A

Solution

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