关于极限值,用VC++6.0编译错误,但是在线编译可以成功
#include <stdio.h>#include<limits.h>
#include<float.h>
int main(void)
{
printf("变量的类型为%d到%d个字符存储值",CHAR_MIN,CHAR_MAX);
printf("\n无符号类型为0到%u个字符存储值",UCHAR_MAX);
printf("\nshort类型为%d到%d个字符存储值",SHRT_MIN,SHRT_MAX);
printf("\nunsigned short类型为0到%u个字符存储值",USHRT_MAX);
printf("\nint类型为%d到%d个字符存储值",INT_MIN,INT_MAX);
printf("\nunsigned int类型为0到%u",UINT_MAX);
printf("\nlong类型为%ld到%ld个字符存储值",LONG_MIN,LONG_MAX);
printf("\nunsigned long类型为0到%lu个字符存储值",ULONG_MAX);
printf("\nlong long类型为%lld到%lld个字符存储值",LLONG_MIN,LLONG_MAX);
printf("\nunsigned long long类型为0到%llu个字符存储值",ULLONG_MAX);
printf("\n\n最小非零值的大小类型的浮动是%.3e",FLT_MIN);
printf("\n规模最大的价值类型的浮动是%.3e",FLT_MAX);
printf("\n规模最大的值的类型是%.3e的两倍",FLT_MAX);
printf("\nThe size of he smallest non-zero value ~ccc of type long double is %.3Le",LDBL_MIN);
printf("\nthe size of the largest value of type long double is %.3Le\n",LDBL_MAX);
printf("\nVariables of type float provide %u deciml digits precision.",FLT_DIG);
printf("\nVariables of type double provide %u deciml digits precision.",DBL_DIG);
printf("\nVariables of type long double provide %u decimal digits precision.",LDBL_DIG);
return 0;
}
求解答 VC6不符合标准
页:
[1]