0xFF != '\xFF' ?

Doug Gwyn gwyn at smoke.brl.mil
Wed Apr 10 14:36:35 AEST 1991


In article <28007837.35A9 at marob.uucp> daveh at marob.uucp (Dave Hammond) writes:
>Is this because the '\nnn' token being seen as a char value and chars are
>signed on the machines I tested on?

Essentially, yes.  The value 255 gets stuffed into a char then converted
to type int, which propagates the sign bit when char acts as a signed type.



More information about the Comp.lang.c mailing list