This statement:
if(\'z\' - \'a\' == 25)
is not guaranteed to evaluate in the same way. It is compiler dependent. Also, it is not guaranteed to
Because not all computers use ascii or unicode.
In the past, a standard called ebcdic was common. In ebcdic 500 the value of 'z'
is 169 and the value of 'a'
is 130. The expression 'z'-'a'
would then evaluate to 39.
This explains why you cannot assume a certain value for an expression of the type 'a'
or even 'z'-'a'
. However, it does not explain why the two expressions in the Q are not guaranteed to be equal.
The preprocessor and the compiler are two different things. The preprocessor deals with the encoding used in the source code, while the compiler targets the machine you are compiling for. See zwol's answer for a more elaborate explanation.