下面程序段的输出结果是( )。 #include<stdio.h> main(
题型:单项选择题
问题:
下面程序段的输出结果是( )。
#include<stdio.h>
main()
float x=1.236547;
printf("%f\n",(int)(x*1000+0.5)/(float)1000);
A) 1.237000
B) 输出格式说明与输出项不匹配,输出无定值
C) 1.236000
D) 1.24
下面程序段的输出结果是( )。
#include<stdio.h>
main()
float x=1.236547;
printf("%f\n",(int)(x*1000+0.5)/(float)1000);
A) 1.237000
B) 输出格式说明与输出项不匹配,输出无定值
C) 1.236000
D) 1.24