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?
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
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
From C99 standard:
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.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]