Would I be correct to say that the underlying object representation (bit pattern) in each of the following definitions is the same?
char c = 240;
unsigned char c = 240;
signed char c = 240;
So, the signed-ness matters only when c is used in an expression (or casts)?
In general case it is not correct to say that the pattern is the same, if the range of
signed chardoes not cover240. If240is out of range, the result of this overflowing initialization is implementation-defined (and may result in a signal, see 6.3.1.3/3). The same applies tocharinitialization if it is signed.The language guarantees matching representations only for the common part of the ranges of
signed charandunsigned char. E.g. this is guaranteed to produce the same patternWith
240there’s no such guarantee in general case (assuming it is out of range).