In c, in bool, true == 1 and false == 0?
2 answers
You were neglecting which version of C you are worried about. Let's assume this is one:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
As you can see from reading the spec, the standard definitions of true
and false
are 1 and 0, yes.
If you have a question about a different version of C or non-standard definitions for true
and false
, ask a more specific question.
+2
source to share