climits (limits.h) | header |
Sizes of integral types
This header defines constants with the limits of integral types for the specific system and compiler implemetation used.
The following panel shows the different constants and their guaranteed minimal magnitudes (positive numbers may be greater in value, and negative numbers may be less in value). Any particular compiler implementation may define integral types with greater magnitudes than those shown here:
name | expresses | min. magnitude* |
---|---|---|
CHAR_BIT | Number of bits for a char object (byte) | 8 |
SCHAR_MIN | Minimum value for an object of type signed char | -127 |
SCHAR_MAX | Maximum value for an object of type signed char | 127 |
UCHAR_MAX | Maximum value for an object of type unsigned char | 255 |
CHAR_MIN | Minimum value for an object of type char | either SCHAR_MIN or 0 |
CHAR_MAX | Maximum value for an object of type char | either SCHAR_MAX or UCHAR_MAX |
MB_LEN_MAX | Maximum number of bytes in a multibyte character, for any locale | 1 |
SHRT_MIN | Minimum value for an object of type short int | -32767 |
SHRT_MAX | Maximum value for an object of type short int | 32767 |
USHRT_MAX | Maximum value for an object of type unsigned short int | 65535 |
INT_MIN | Minimum value for an object of type int | -32767 |
INT_MAX | Maximum value for an object of type int | 32767 |
UINT_MAX | Maximum value for an object of type unsigned short int | 65535 |
LONG_MIN | Minimum value for an object of type long int | -2147483647 |
LONG_MAX | Maximum value for an object of type long int | 2147483647 |
ULONG_MAX | Maximum value for an object of type unsigned int | 4294967295 |
* This is not necessarily the actual value of the constant in any particular compiler or system, it may be equal or greater in magnitude than this.
See also
cfloat | Characteristics of floating-point types (header) |