Home » C++ Programming » Numbers » Question
  1. What is the output of this program?
    #include <iostream>
    #include <complex>
    using namespace std;
    int main()
    {
    complex<int> num(4, 5);
    num = num * 7 / 4;
    cout << num;
    return 0;
    }
    1. (8,7)
    2. (7,0)
    3. (7,8)
    4. (8,0)
    5. None of these
Correct Option: C

We are multiplying the complex number by 4.



Your comments will be displayed only after manual approval.