For portable applications, use only the assignment =
operator, the equality operators ==
and !=
, and the unary &
operator on plain character–typed -character-typed or plain-wide-character–typed character-typed expressions.
This practice is recommended because the C Standard requires only the digit characters (0–9) to have consecutive numerical values. Consequently, operations that rely on expected values for plain character– -character- or plain-wide-character-character–typed typed expressions can lead to unexpected behavior.
...
[Jones 2009] | Section 5.2.1, "Character Sets" |