填空题
有以下程序 main( ) { int n=0,m=1,x=2; if(!n) x-=1; if(m) x-=2; if(x) x-=3; printf(“%d\n”,x);} 执行后输出结果是【 】。
【参考答案】
-4
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
已有文本文件test.txt,其中的内容为:Hello,everyone!。以下程序中,文件test.txt已正确为“读”而打开,由此文件指针fr指向文件,则程序的输出结果是【 】。#include <stdio.h>main( ){ FILE *fr; char str[40];......fgets(str,5,fr);printf( %s n ,str);fclose(fr);}
点击查看答案
填空题
以下程序运行后的输出结果是【 】。main( ){ int x=15;while(x>10 &&x<50){ x++;if(x 3){ x++;break;}else continue;}printf( %d n ,x);}
点击查看答案
相关试题
软件工程三要素包括方法、工具和过程,其中...
以下程序运行后的输出结果是【 】。main(...
若有定义:int k;,下列程序段的输出结果...