C++ Programming
COMPLEX NUMBER TYPE MCQs
Total Questions : 10
imag part will return the imaginery part of the complex number.
Output:
$ g++ comp5.cpp
$ a.out
2
None.
In this program, we are adding both complex number and finding the square root of it.
Output:
$ g++ comp4.cpp
$ a.out
(6.12132,3.70711)
We are adding the two complex numbers and printing the result.
Output:
$ g++ comp3.cpp
$ a.out
c1: (4,3)(7.65844,6.40819)
We are multiplying the complex number by 2.
Output:
$ g++ comp2.cpp
$ a.out
(4,6)
We are just copying the value of c_int into c_double, So it’s printing as (4,5).
Output:
$ g++ comp1.cpp
$ a.out
(4,5)
There are three real types in complex numbers. They are float complex, double complex, long
double complex.
In this program, we are finding the square of the complex number.
Output:
$ g++ comp.cpp
$ a.out
(-240,128)
None.
We can declare the complex number by using complex(3,4) where 3 is a real number and
4 is imaginary part.
Recent Questions
Q. The Frequency Of Oscillation At Compared To Earth Will Be
Q. The Formula In Which Σ(x-x̅)² Is Divided By One Less ....
Q. If....
Q. What Is The National Sport Of Canada(in Winter And Summer)?
Q. A Well-oiled Machinery For The Creation And Diffusion Of Fad....
Q. Considering All 2-digit Natural Numbers, How Many Values Of ....
Q. In A Gas Welding Of Mild Steel Using An Oxyacetylene Flame, ....
Q. Which One Of Following Fuels Is Used By Slow Thermal Nuclear....
Q. Answer The Questions On The Basis Of The Following Informat....
Q. Who Discovered The Path Of Circulation Of Blood In The Human....
Q. __________ Is Produced Using Molasses As The Starting Raw Ma....
Q. &n....
Q. `3....
Q. The Ratio Of Mass Concentration Of Species A To The Total M....
Q. Which Pesticide Killed Many Other Organisms Instead Of Only ....
Q. Resolution Of A DVM Is Given By ____________
Q. Who Has Hinted At The Possible Community Transmission Of The....
Q. The Ability Of Money To Be Moved Easily Is Called:
Q. EXORBITANT
Q. An Inventory, Which Consists Of Partially Worked Goods Is Ca....