Home / MCQ Bank / Computer
Computer Classes And Objects In C Plus Plus

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

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • 2

Related Computer Questions

What is the purpose of the "protected" access modifier in Java inheritance? In C#, which method is used to open an existing text file for reading? What will be the output of the following Python code? def to_upper(k): return k.upper() x = ['ab', 'cd'] print(list(map(upper, x))) What is the purpose of the rvest package in R? What is the purpose of the canvas element?