4.3.2系统定义的明显常量-使用limit.h和float.h中定义的常量

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

#include
#include//整数限制
#include//浮点数限制
int main(void)
{
printf("Some number limits for this system:\n");
printf("Biggest int: %d\n", INT_MAX);
printf("Smallest unsigned short max:%d\n",SHRT_MAX);
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;
}
/*在Vc中的输出结果是:
Some number limits for this system:
Biggest int: 2147483647
Smallest unsigned short max:32767
one byte = 8 bits on this system.
Largest double: 1.797693e+308
Smallest normal float: 1.175494e-038
float precision = 6 digits
float epsilon = 1.192093e-007
Press any key to continue

在本系统中LLONG_MIN不识别
*/

相关文档
最新文档