Primitive Built In Types

Arithmetic Types

bool boolean
char character
wchar_t wide character
short short integer
int integer
long long integer
float single-precision floating-point
double double-precision floating-point
long double extended-precision floating-point

Signed and Unsigned Types

The integral types, except the boolean type, may be either signed or unsigned. As its name suggests, a signed type can represent both negative and positive numbers (including zero), whereas an unsigned type represents only values greater than or equal to zero.

The integers, int, short, and long, are all signed by default. To get an unsigned type, the type must be specified as unsigned, such as unsigned long. The unsigned int type may be abbreviated as unsigned. That is, unsigned with no other type implies unsigned int.

unsigned >= 0

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.