This was soo annoying to track down I thought I'd come out of retirement to post it.
printf("%02hhX\n", 4-7);
What should that print out?
Printable View
This was soo annoying to track down I thought I'd come out of retirement to post it.
printf("%02hhX\n", 4-7);
What should that print out?
FFFD according to Borland 5.5 and Turbo 1.0
From C99 standard:
Quote:
hh Specifies that a following d, i, o, u, x, or X conversion specifier applies to a
signed char or unsigned char argument (the argument will have
been promoted according to the integer promotions, but its value shall be
converted to signed char or unsigned char before printing); or that
a following n conversion specifier applies to a pointer to a signed char
argument.