2 ms·
The comparison operators are specifically defined in the C standard to output 1 if true and 0 if false.
by AgentME 3y ago
The comparison operators are specifically defined in the C standard to output 1 if true and 0 if false.
- viraptor 3y agoI was curious about the details. 6.5.8 in https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf Also 7.18 makes the bool macros explicitly 1 and 0.