Which of the following is False?
1
-1
0
.1Which of the following is false in C++?
0 represent false, anything else that would have a 1 bit is true.Which of the following is false in C++?
0 is false. Anything that's not 0 is true.
This also works in most other programming languages. You can do some fun shorthand tricks.
Example:
if (x != 0)
becomes
if (x)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment