程序结果为什么不一样
#include <stdio.h>
int main()
{
double a = 41.0;
printf("%lg\n", 1 / a * a -1);
return 0;
}
#include <stdio.h>
int main()
{
double a = 49.0;
printf("%lg\n", 1 / a * a- 1);
return 0;
}
问题同上
#include <stdio.h>
int main()
{
unsigned short int a = 65535;
printf("%hu\n", a);
a++;
printf("%hu\n", a);
return 0;
}
2)
#include <stdio.h>
int main()
{
long int a = 2147483647;
printf("%ld\n", a);
a++;
printf("%ld\n", a);
return 0;
}