1.

Which function is used to get the imaginary part of the complex number?(a) real()(b) imag()(c) imag_p()(d) real_p()This question was addressed to me by my college director while I was bunking the class.My query is from Complex Library topic in section Class Hierarchies, Library & Containers of C++

Answer» CORRECT choice is (B) imag()

To explain: The imag() FUNCTION is provided by the complex
to access the imaginary PART of a complex number object.


Discussion

No Comment Found

Related InterviewSolutions