
The following table provides a complete list of the standard integer types and their minimum allowed widths (including any sign bit). The representation of some types may include unused "padding" bits, which occupy storage but are not included in the width. In many cases, there are multiple equivalent ways to designate the type for example, signed short int and short are synonymous. Signed integer types may use a two's complement, ones' complement, or sign-and-magnitude representation.

(Although char can represent any of C's "basic" characters, a wider type may be required for international character sets.) Most integer types have both signed and unsigned varieties, designated by the signed and unsigned keywords. The type char occupies exactly one byte (the smallest addressable storage unit), which is typically 8 bits wide. Also, bit field types specified as plain int may be signed or unsigned, depending on the compiler.Ĭ's integer types come in different fixed sizes, capable of representing various ranges of numbers. It may be a signed type or an unsigned type, depending on the compiler and the character set (C guarantees that members of the C basic character set have positive values). However, for historic reasons plain char is a type distinct from both signed char and unsigned char. If signed or unsigned is not specified explicitly, in most circumstances signed is assumed. Integral data types store numbers in the set of integers, while real and complex numbers represent numbers (or pair of numbers) in the set of real numbers in floating point form.Īll C integer types have signed and unsigned variants. This distinction reflects similar distinctions in the instruction set architecture of most central processing units. The C language represents numbers in three forms: integral, real and complex.

Main article: C data types Primitive data types
