
阅读程序题
1、int x=6, y=7;
printf(“%d,”,x++); printf(“%d\n”,++y);
程序的输出结果是__________。
2、float f=3.1415927;
printf(“%f,%5.4f,%3.3f”,f,f,f);
则程序的输出结果是__________。
3、a=3;
a+=(a<1)?a:1; printf(“%d”,a);
结果是__________。
4、main( )
{ int a[5]={2,4,6,8,10},*P,* *k;
p=a; k=&p;
printf("%d,",*(p++));
printf("%d\n",* *k); }
程序的输出结果是__________。
5、 main()
{int a,b;
for (a=1,b=1;a<=100;a++)
{ if(b>=20) break;
if(b%3==1)
{b+=3; continue; }
b-=5; } }
程序的输出结果a的值为__________。
参考答案:
(1) 6,8
(2) 3.141593,3.1416,3.142
(3) 4
(4) 2,4
(5) 8
2016年9月计算机二级C语言考前测试题及答案1.doc正在阅读:
妈妈感谢你作文600字06-21
我要当天文学家作文400字08-05
五年级作文范文我和汉字的故事,五年级作文范文我和汉字的故事07-26
2020年平安夜简短祝福句子大全10-16
2022公司员工试用期工作总结【5篇】09-21
初三优秀作文:人教版九上第五单元作文辅导12-08