P

Priyanka Tomar • 35.28K 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: 78
  • Filed under category C++

Explanation by: Priyanka Tomar
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.


Question analytics