单选题 有如下程序:
#include <stdio.h>
main()
float x=2.0,y;
if(x<0.0) y=0.0;
else if(x>10.0) y=1.0/x;
else y=1.0;
printf("%f/n",y);

该程序的输出结果是( )。

【正确答案】 D
【答案解析】[解析] 本题中,x=2.0,因此执行else y=1.0,并且以“%f”输出。