Live quiz

cpp - Part 16

Question 1 of 25 Hints left: 3
Q1

What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { float f1 = 0.5; double f2 = 0.5; if (f1 == 0.5f) cout << "equal"; else cout << "not equal"; return 0; }

  • A
  • B
  • C
  • D