C言語なら、俺に聞け! <7>
■ このスレッドは過去ログ倉庫に格納されています
0298デフォルトの名無しさん
NGNG6.4.4.4 Character constants
An integer character constant has type int. The value
of an integer character constant containing a single
character that maps to a member of the basic execution
character set is the numerical value of the representation
of the mapped character interpreted as an integer.
...
EXAMPLE 2 Consider implementations that use two's-
complement representation for integers and eight bits for
objects that have type char. In an implementation in which
type char has the same range of values as signed char, the
integer character constant '\xFF' has the value -1; if type
char has the same range of values as unsigned char, the
character constant '\xFF' has the value +255 .
わかった?
■ このスレッドは過去ログ倉庫に格納されています