As explained in this article, the values false and true should not be confused with the integers 0 and 1, but may be identified with the elements of the Galois field (finite field) of two elements (see here).
A field is a set with two operations that satisfy certain axioms.
The symbols 0 and 1 are conventionally used to denote the additive and multiplicative identities of a field because the real numbers are also a field (but not a finite one) whose identities are the numbers 0 and 1.
The additive identity is the element 0 of the field, such that for all x:
x + 0 = 0 + x = x
and the multiplicative identity is the element 1 of the field, such that for all x:
x * 1 = 1 * x = x
The finite field of two elements has only these two elements, namely the additive identity 0 (or false), and the multiplicative identity 1 (or true).
The two operations of this field are the logical XOR (+) and the logical AND (*).
Note. If you flip the operations (XOR is the multiplication and AND is the addition) then the multiplication is not distributive over addition and you do not have a field any more. In such a case you have no reason to call the two elements 0 and 1 (in any order). Note also that you cannot choose the operation OR instead of XOR: no matter how you interpret OR / AND as addition / multiplication, the resulting structure is not a field (not all inverse elements exist as required by the field axioms).
Regarding the C functions:
- Many functions return an integer that is an error code. 0 means NO ERROR.
- Intuitively, the function
strcmpcomputes the difference between two strings. 0 means that there is no difference between two strings, i.e. that two strings are equal.
The above intuitive explanations can help to remember the interpretation of the return values, but it is even easier to just check the library documentation.