登录 | 注册 | 收藏鲤鱼网 | 捐助鲤鱼 | 著作权声明 | 鲤鱼首页
投递新闻 您所在的位置:鲤鱼首页 >全国计算机等级考试NCRE新闻 >2009年9月计算机等级考试二级C语言模拟试题(6)
时间:2009-09-10 来源:鲤鱼网 (精品全国计算机等级考试NCRE资料,点击即可下)
23.下面的程序执行后,文件test中的内容是( )
#include
void fun(char *fname,char *st)
{ FILE *myf;int i;
myf=fopen(fname,″w″);
for(i=0;i fclose(myf); } main() { fun(″test″,″new world″);fun(″test″,″hello,″);} A.hello, B.new worldhello, C.new world D.hello,rld 【参考答案】A 24.若有定义:int a=8,b=5,c;,执行语句c=a/b+0.4;后,c的值为( ) A.1.4 B.1 C.2.0 D.2 【参考答案】B
fclose(myf);
}
main()
{ fun(″test″,″new world″);fun(″test″,″hello,″);}
A.hello, B.new worldhello, C.new world D.hello,rld
【参考答案】A
24.若有定义:int a=8,b=5,c;,执行语句c=a/b+0.4;后,c的值为( )
A.1.4 B.1 C.2.0 D.2
【参考答案】B
Copyright©2009 iliyu.com All Rights Reserved 鲤鱼网