limits.h

Defines maximum and minimum values that integral data types may contain.

This header file defines macros that describe the maximum and minimum values that objects with integral data types may accurately represent. Assigning values beyond the range of these limits will give undefined results at runtime.

The limits.h header file does not define macros to describe the minimum values for unsigned data types. The minimum value of an unsigned data type is always 0. The table below lists the preprocessor macros that define replacements for operators that use characters that are not available in some character sets.
Table 1. Integral Limits
Macro Value
CHAR_BIT Number of bits in the smallest data type that is not a bit field.
CHAR_MAX, CHAR_MIN Maximum and minimum values, respectively, for char.
SCHAR_MAX, SCHAR_MIN Maximum and minimum values, respectively, for signed char.
UCHAR_MAX Maximum value for unsigned char.
SHRT_MAX, SHRT_MIN Maximum and minimum values, respectively, for short int.
USHRT_MAX Maximum value for unsigned short int.
INT_MAX, INT_MIN Maximum and minimum values, respectively, for int.
UINT_MAX Maximum value for unsigned int.
LONG_MAX, LONG_MIN Maximum and minimum values, respectively, for long int.
ULONG_MA Maximum value for unsigned long int.
MB_LEN_MAX Maximum number of bytes in a multibyte character.
LLONG_MAX, LLONG_MIN Maximum and minimum values, respectively, for long long int. This facility is not part of the ISO/IEC standard for C. It is an EWL extension of the C Standard Library.
ULLONG_MAX Maximum value for unsignedlong long int. This facility is not part of the ISO/IEC standard for C. It is an EWL extension of the C Standard Library.