A

Admin • 833K Points
Coach

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

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

Explanation by: Admin

The logical NOT operator (!) returns false (0) if the operand is non-zero.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.