S

Shiva Ram • 30.44K Points
Instructor I

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

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

Explanation by: Shiva Ram
The less-than-or-equal-to operator (<=) returns true (1) if the first operand is less than or equal to the second.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics