Thread: Grah

  1. #1
    Evil Member
    Join Date
    Jan 2002
    Posts
    638

    Grah

    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?

  2. #2
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    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

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    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]

Popular pages Recent additions subscribe to a feed