<limits.h> Implementation-Defined Limits

The header file limits.h consists of macros that define the minimum and maximum values of integer types. Each of these macros can be used in #if preprocessing directives.

Table 1. Declarations Provided by <limits.h>
Macro Name Description Value
CHAR_BIT Number of bits to represent type char 8
CHAR_MAX Maximum value of a char 127
CHAR_MIN Minimum value of a char -128
INT_MAX Maximum value of a int 32767
INT_MIN Minimum value of a int -32768
LLONG_MAX Maximum value of a long long int 9223372036854775807
LLONG_MIN Minimum value of a long long int -9223372036854775808
LONG_MAX Maximum value of a long int 2147483647
LONG_MIN Minimum value of a long int -2147483648
MB_LEN_MAX Maximum number of bytes in a multibyte character 1
SCHAR_MAX Maximum value of a signed char 127
SCHAR_MIN Minimum value of a signed char -128
SHRT_MAX Maximum value of a short int 32767
SHRT_MIN Minimum value of a short int -32768
UCHAR_MAX Maximum value of an unsigned char 255
UINT_MAX Maximum value of an unsigned int 65535
ULLONG_MAX Maximum value of a long long unsigned int 18446744073709551615
ULONG_MAX Maximum value of a long unsigned int 4294967295
USHRT_MAX Maximum value of an unsigned short int 65535