1/11/00
COM1100 Winter2000 Yuhong Yin Northeastern University
33
signed or unsigned
oCharacter and integer types can be declared as either signed or unsigned
ounsigned are never considered to hold a negative, and so they can hold a large positive value
osigned is the default and not required to specify.
oExamples
ounsigned char ch;
ounsigned int x;
o x = 5; // OK
o x = -5; // Wrong
oint x and signed int x are equal
ox = 5; // OK
ox = -5; // OK
n