View Mode
Q: 14
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"; } }
Options
Question 14 of 35

Premium Access Includes

  • Quiz Simulator
  • Exam Mode
  • Progress Tracking
  • Question Saving
  • Flash Cards
  • Drag & Drops
  • 3 Months Access
  • PDF Downloads
Get Premium Access
Scroll to Top

FLASH OFFER

Days
Hours
Minutes
Seconds

avail 10% DISCOUNT on YOUR PURCHASE