_Bool
From cppreference.com
Implements a Boolean type.
Contents |
[edit] Syntax
_Bool
|
|||||||||
[edit] Explanation
An object declared as type _Bool is large enough to store the values 0 and 1.
When any scalar value is converted to _Bool, the result is 0 if the value compares equal to 0; otherwise, the result is 1.
[edit] Keywords
[edit] Example
Run this code
Possible output:
sizeof(_Bool) = 1 b = 1 !b = 0 !b = 1 false