Current location - Loan Platform Complete Network - Big data management - What are the restrictions of C language on int and float data?
What are the restrictions of C language on int and float data?
C language standard library provides limits.h and float.h to illustrate the limitations of integer and floating-point data.

Limits.h: the range of expression values used to detect the data type of integer data. ?

Float.h: Provides a macro with floating-point range and precision. This header file has no definition of type and function, and is generally used for numerical analysis.

You can directly use the macro defined in it, such as the following code to enter the maximum and minimum values of signed int type and float type.

# include & ltstdio.h & gt

# Contains? & lt restrictions.>

# Contains? & ltfloat.h & gt

int? Master ()

{

Printf("int maximum:% d \ tminimum: %d\n ",? INT_MAX,? INT _ MIN);

Printf ("floating point maximum: %e\t minimum %e\n", FLT _ maximum, FLT _ minimum);

Return? 0;

}