defines.c
This commit is contained in:
parent
e3071cd772
commit
0459caed35
18
c04_string/defines.c
Normal file
18
c04_string/defines.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* defines.c - 使用limits.h和float头文件中定义的明示常量 */
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Some number limits for this system:\n");
|
||||
printf("Biggest int; %d\n", INT_MAX);
|
||||
printf("Smallest long long: %lld\n", LLONG_MIN);
|
||||
printf("One byte = %d bits on this system.\n", CHAR_BIT);
|
||||
printf("Largest double: %e\n", DBL_MAX);
|
||||
printf("Smallest normal float: %e\n", FLT_MIN);
|
||||
printf("float precision = %d digits\n", FLT_DIG);
|
||||
printf("float epsilon = %e\n", FLT_EPSILON);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user