What happens when you attempt to compile and run the following code?

What happens when you attempt to compile and run the following code?
#include #include using namespace std;
class complex{ double re; double im; public:
complex() : re(1),im(0.4) {}
bool operator==(complex &t);
};
bool complex::operator == (complex &t){ if((this?>re == t.re) && (this?>im == t.im))
return true; else return false;
}
int main(){ complex c1,c2; if (c1==c2) cout << "OK"; else { cout << "ERROR"; } } A. It prints: OK
B. It prints: ERROR
C. Compilation error
D. Runtime error.

Download Printable PDF. VALID exam to help you PASS.

Posted in: CPA

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.