Question
1.
#include
2.
#include
3.
using namespace std;
4.
int main()
5.
{
6.
complex c1(4.0, 16.0), c2;
7.
c2 = pow(c1, 2.0);
8.
cout
What is the output of this program?
1.
#include
2.
#include
3.
using namespace std;
4.
int main()
5.
{
6.
complex c1(4.0, 16.0), c2;
7.
c2 = pow(c1, 2.0);
8.
cout
Answer: Option A
Was this answer helpful ?
In this program, we are finding the square of the complex number.
Output:
$ g++ comp.cpp
$ a.out
(-240,128)
Was this answer helpful ?
More Questions on This Topic :
Question 2.
How to declare the complex number?
....
Submit Solution