Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language, how to define numbers greater than long integers and partial decimals,
C language, how to define numbers greater than long integers and partial decimals,
The maximum and minimum values of long integers and integers in C language are defined in the form of macros in stdlib.h limits, which can be directly viewed or used by H users.

Int _ max: the maximum value of type int.

Int _ min: the minimum value of int type.

Uint _ max: the maximum value of unsigned int type.

LONG_MAX: the maximum value of a long integer.

LONG_MIN: the minimum value of a long integer.

ULONG_MAX: the minimum value of a long integer.

Examples are as follows:

# include & ltstdio.h & gt

# include & lt restrictions.>

int main()

{

printf(" INT_MAX:% d \ n INT _ MAX:% u \ n LONG_MAX:% d \ n LONG _ MAX:% u \ n ",INT _ MAX,UINT_MAX,LONG _ MAX,ULONG _ MAX);

printf(" INT_MIN:% d \ nLONG _ MIN:% d \ n ",INT _ MIN,LONG _ MIN);

Returns 0;

}