C all library function of limits.h header file

limits.h header file contains the definition of functions which gives the characteristics of common variable types. You can easily check the maximum and minimum value of any data types using the function of limits.h header file.

All the built in function of limits.h header file is given bellow;

Name Description of function
CHAR_BIT
It is used to print the number of bits in a character
INT_MAX
It is used to print maximum value of an integer
INT_MIN
It is used to print the minimum value of an integer
SCHAR_MIN
It is used to print the minimum value of a signed character
SCHAR_MAX
It is used to print the maximum value of a signed character
CHAR_MIN
It is used to print the minimum value of a character of your system
CHAR_MAX
It is used to print maximum value of a character of your system
UCHAR_MAX
It is used to print maximum value of an unsigned character
LONG_MIN
Used to print minimum value of long int data type
LONG_MAX
Used to print maximum value of long int data type
ULONG_MAX
Used to print maximum value of a unsigned long int data type
ULLONG_MAX
Used to print maximum value of a unsigned long long int data type
ULLONG_MIN
Used to print minimum value of a long long int data type
LLONG_MIN
Used to print minimum value of a long long int data type
LLONG_MAX
Used to print maximum value of a long long int data type
SHRT_MIN
Used to print minimum value of a short int data type of your system
SHRT_MAX
Used to print maximum value of a short int data type of your system
USHRT_MAX
Used to print maximum value of an unsigned short int data type of your system
UNIT_MAX
Used to print maximum value of an unsigned int data type of your system

C program to determine limit of a data type for your system

#include <stdio.h>
#include <limits.h>

int main(){
    printf("Maximum value of integer is = %d\n", INT_MAX);
    printf("Minimum value of integer is = %d\n", INT_MIN);
    printf("Maximum value of long int is = %ld\n", LONG_MAX);
    printf("Minimum value of long int is = %ld\n", LONG_MIN);
return 0;
}

Output of program:

library-function-of-limits.h-header-files

Previous pagefloat.h header file

Next pagewctype.h header file