Re:A Quiz About Integers in C
by sltkr on Sunday June 03, 2012 @11:11PM
(#4062498)
That tripped me up too, and I'm pretty sure that answer is wrong. It's implementation defined, since it's implementation defined whether or not 'char' is signed or not.
[ Parent
| on HN ]
It is, but this quiz is in the context of x86 and x86-64.
> Also assume that x86 or x86-64 is the target. In other words, please answer each question in the context of a C compiler whose implementation-defined characteristics include two's complement signed integers, 8-bit chars, 16-bit shorts, and 32-bit ints. The long type is 32 bits on x86, but 64 bits on x86-64 (this is LP64, for those who care about such things).