V

Vinay • 28.75K Points
Instructor II

Q. What is the output of the following code snippet? int x = 10; int y = 20; cout << (x == y);

  • (A) 1
  • (B) 0
  • (C) 10
  • (D) 20
  • Correct Answer - Option(B)
  • Views: 31
  • Filed under category C++

Explanation by: Vinay
The expression (x == y) evaluates to false, which is represented as 0 in C++.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics