# <limits.h>
<limits.h>
# ``
* * *
Include the standard header **``**
to determine various properties of the integer type representations.
The standard header `` is available
even in a
[freestanding implementation](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_lib_over.html#freestanding%20implementation).
You can test the values of all these macros in an
[*if* directive](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_preproc.html#if%20directive).
(The macros are
[*#if* expressions](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_preproc.html#if%20expression).)
#define CHAR_BIT <#if expression >= 8>
#define CHAR_MAX <#if expression >= 127>
#define CHAR_MIN <#if expression <= 0>
#define SCHAR_MAX <#if expression >= 127>
#define SCHAR_MIN <#if expression <= -127>
#define UCHAR_MAX <#if expression >= 255>
#define MB_LEN_MAX <#if expression >= 1>
#define SHRT_MAX <#if expression >= 32,767>
#define SHRT_MIN <#if expression <= -32,767>
#define USHRT_MAX <#if expression >= 65,535>
#define INT_MAX <#if expression >= 32,767>
#define INT_MIN <#if expression <= -32,767>
#define UINT_MAX <#if expression >= 65,535>
#define LONG_MAX <#if expression >= 2,147,483,647>
#define LONG_MIN <#if expression <= -2,147,483,647>
#define ULONG_MAX <#if expression >= 4,294,967,295>
#define LLONG_MAX <#if expression >= 9,223,372,036,854,775,807> [added with C99]
#define LLONG_MIN <#if expression <= -9,223,372,036,854,775,807> [added with C99]
#define ULLONG_MAX <#if expression >= 18,446,744,073,709,551,615> [added with C99]Copy to clipboard
## `CHAR_BIT`
#define CHAR_BIT <#if expression >= 8>Copy to clipboard
The macro yields the maximum value for the number of bits used
to represent an object of type *char.*
## `CHAR_MAX`
#define CHAR_MAX <#if expression >= 127>Copy to clipboard
The macro yields the maximum value for type *char.* Its
value is:
- [`SCHAR_MAX`](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_limits.html#SCHAR_MAX)
if *char* represents negative values
- [`UCHAR_MAX`](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_limits.html#UCHAR_MAX) otherwise
## `CHAR_MIN`
#define CHAR_MIN <#if expression <= 0>Copy to clipboard
The macro yields the minimum value for type *char.* Its
value is:
- [`SCHAR_MIN`](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_limits.html#SCHAR_MIN)
if *char* represents negative values
- zero otherwise
## `INT_MAX`
#define INT_MAX <#if expression >= 32,767>Copy to clipboard
The macro yields the maximum value for type *int.*
## `INT_MIN`
#define INT_MIN <#if expression <= -32,767>Copy to clipboard
The macro yields the minimum value for type *int.*
## `LLONG_MAX`
#define LLONG_MAX <#if expression >= 9,223,372,036,854,775,807> [added with C99]Copy to clipboard
The macro yields the maximum value for type *long long.*
## `LLONG_MIN`
#define LLONG_MIN <#if expression <= -9,223,372,036,854,775,807> [added with C99]Copy to clipboard
The macro yields the minimum value for type *long long.*
## `LONG_MAX`
#define LONG_MAX <#if expression >= 2,147,483,647>Copy to clipboard
The macro yields the maximum value for type *long.*
## `LONG_MIN`
#define LONG_MIN <#if expression <= -2,147,483,647>Copy to clipboard
The macro yields the minimum value for type *long.*
## `MB_LEN_MAX`
#define MB_LEN_MAX <#if expression >= 1>Copy to clipboard
The macro yields the maximum number of characters that constitute a
[multibyte character](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_charset.html#Multibyte%20Characters)
in any supported
[locale](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_locale.html). Its value is >=
[`MB_CUR_MAX`](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_stdlib.html#MB_CUR_MAX).
## `SCHAR_MAX`
#define SCHAR_MAX <#if expression >= 127>Copy to clipboard
The macro yields the maximum value for type *signed char.*
## `SCHAR_MIN`
#define SCHAR_MIN <#if expression <= -127>Copy to clipboard
The macro yields the minimum value for type *signed char.*
## `SHRT_MAX`
#define SHRT_MAX <#if expression >= 32,767>Copy to clipboard
The macro yields the maximum value for type *short.*
## `SHRT_MIN`
#define SHRT_MIN <#if expression <= -32,767>Copy to clipboard
The macro yields the minimum value for type *short.*
## `UCHAR_MAX`
#define UCHAR_MAX <#if expression >= 255>Copy to clipboard
The macro yields the maximum value for type *unsigned char.*
## `UINT_MAX`
#define UINT_MAX <#if expression >= 65,535>Copy to clipboard
The macro yields the maximum value for type *unsigned int.*
## `ULLONG_MAX`
#define ULLONG_MAX <#if expression >= 18,446,744,073,709,551,615> [added with C99]Copy to clipboard
The macro yields the maximum value for type *unsigned long long.*
## `ULONG_MAX`
#define ULONG_MAX <#if expression >= 4,294,967,295>Copy to clipboard
The macro yields the maximum value for type *unsigned long.*
## `USHRT_MAX`
#define USHRT_MAX <#if expression >= 65,535>Copy to clipboard
The macro yields the maximum value for type *unsigned short.*
* * *
See also the
**[Table of Contents](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_index.html#Table%20of%20Contents)** and the
**[Index](https://docs.qualcomm.com/doc/80-N3040-23/topic/_c_index.html)**.
*[Copyright](https://docs.qualcomm.com/doc/80-N3040-23/topic/c_crit_pjp.html) © 1992-2006by P.J. Plauger and Jim Brodie. All rights reserved.*
Last Published: Oct 06, 2026
Previous Topic
Next Topic