`<limits.h>`

Include the standard header ** <limits.h>**
to determine various properties of the integer type representations.
The standard header

`<limits.h>`

is available
even in a
freestanding implementation.You can test the values of all these macros in an
*if* directive.
(The macros are
*#if* expressions.)

#defineCHAR_BIT<#if expression >= 8>#defineCHAR_MAX<#if expression >= 127>#defineCHAR_MIN<#if expression <= 0>#defineSCHAR_MAX<#if expression >= 127>#defineSCHAR_MIN<#if expression <= -127>#defineUCHAR_MAX<#if expression >= 255>#defineMB_LEN_MAX<#if expression >= 1>#defineSHRT_MAX<#if expression >= 32,767>#defineSHRT_MIN<#if expression <= -32,767>#defineUSHRT_MAX<#if expression >= 65,535>#defineINT_MAX<#if expression >= 32,767>#defineINT_MIN<#if expression <= -32,767>#defineUINT_MAX<#if expression >= 65,535>#defineLONG_MAX<#if expression >= 2,147,483,647>#defineLONG_MIN<#if expression <= -2,147,483,647>#defineULONG_MAX<#if expression >= 4,294,967,295>

`CHAR_BIT`

#defineCHAR_BIT<#if expression >= 8>

The macro yields the maximum value for the number of bits used
to represent an object of type *char.*

`CHAR_MAX`

#defineCHAR_MAX<#if expression >= 127>

The macro yields the maximum value for type *char.* Its
value is:

`CHAR_MIN`

#defineCHAR_MIN<#if expression <= 0>

The macro yields the minimum value for type *char.* Its
value is:

`SCHAR_MIN`

if*char*represents negative values- zero otherwise

`INT_MAX`

#defineINT_MAX<#if expression >= 32,767>

The macro yields the maximum value for type *int.*

`INT_MIN`

#defineINT_MIN<#if expression <= -32,767>

The macro yields the minimum value for type *int.*

`LONG_MAX`

#defineLONG_MAX<#if expression >= 2,147,483,647>

The macro yields the maximum value for type *long.*

`LONG_MIN`

#defineLONG_MIN<#if expression <= -2,147,483,647>

The macro yields the minimum value for type *long.*

`MB_LEN_MAX`

#defineMB_LEN_MAX<#if expression >= 1>

The macro yields the maximum number of characters that constitute a
multibyte character
in any supported
locale. Its value is >=
`MB_CUR_MAX`

.

`SCHAR_MAX`

#defineSCHAR_MAX<#if expression >= 127>

The macro yields the maximum value for type *signed char.*

`SCHAR_MIN`

#defineSCHAR_MIN<#if expression <= -127>

The macro yields the minimum value for type *signed char.*

`SHRT_MAX`

#defineSHRT_MAX<#if expression >= 32,767>

The macro yields the maximum value for type *short.*

`SHRT_MIN`

#defineSHRT_MIN<#if expression <= -32,767>

The macro yields the minimum value for type *short.*

`UCHAR_MAX`

#defineUCHAR_MAX<#if expression >= 255>

The macro yields the maximum value for type *unsigned char.*

`UINT_MAX`

#defineUINT_MAX<#if expression >= 65,535>

The macro yields the maximum value for type *unsigned int.*

`ULONG_MAX`

#defineULONG_MAX<#if expression >= 4,294,967,295>

The macro yields the maximum value for type *unsigned long.*

`USHRT_MAX`

#defineUSHRT_MAX<#if expression >= 65,535>

The macro yields the maximum value for type *unsigned short.*

See also the
**Table of Contents** and the
**Index**.

*
Copyright © 1992-2006
by P.J. Plauger and Jim Brodie. All rights reserved.*

Last modified: 2013-12-21