【单选题】【消耗次数:1】
下述程序的运行结果( )。 #includevoid main() { int a=4,b=3,c=5,t=0; if(aa=b;b=t; if(aa=c;c=t; printf(%d,%d,%d\n,a,b,c); }
5,1,3
4,5,6
5,0,3
3,4,7
参考答案:
复制
纠错
相关题目
【单选题】 下述程序的运行结果( )。 #includevoid main() { int a=4,b=3,c=5,t=0; if(aa=b;b=t; if(aa=c;c=t; printf(%d,%d,%d\n,a,b,c); }
①  5,0,3
②  4,5,6
③  5,1,3
④  3,4,6
【单选题】 下述程序的运行结果( )。 #includevoid main() { int a=1,b=2,c=3; if(c=a)printf(%d\n else printf(%d\n }
①  1
②  3
③  5
④  6
【单选题】 下述程序的运行结果( )。 #includevoid main() { int a=5,b=4,c=3,d=2; if(ac)printf(%d\n else if((c-1=d)==1)printf(%d\n,d+1); else printf(%d\n,d+2); }
①  0
②  1
③  2
④  3
【单选题】 下述程序的运行结果( )。 #includevoid main() { int a=5,b=4,c=3,d=2; if(ac)printf(%d\n else if((c-1=d)==1)printf(%d\n,d+1); else printf(%d\n,d+2); }
①  1
②  2
③  3
④  4
【单选题】 下列程序执行后的输出结果是 #includevoid main( ) { int a=5,b=60,c; if (ab) {c=a*b;printf(%d*%d=%d\n,b,a,c);} else {c=b/a;printf(%d/%d=%d\n,b,a,c);} }
①  60/5=12
②  300
③  60*5=300
④  12
【单选题】 下列程序执行后的输出结果是________. #include stdio.h void main( ) { int a=5,b=60,c; if (ab) {c=a*b;printf(%d*%d=%d\n,b,a,c);} else {c=b/a;printf(%d/%d=%d\n,b,a,c);} }
①  60/5=12
②  300
③  60*5=300
④  12
【单选题】 下列程序执行后的输出结果是_______.#include stdio.h void main( ) { int a=5,b=60,c; if (ab) {c=a*b; printf(%d*%d=%d\n,b,a,c);} else {c=b/a; printf(%d/%d=%d\n,b,a,c);} }
①  60/5=12
②  300
③  60*5=300
④  12
【单选题】 有如下程序: #includevoid main( ) { int a=2,b=-1,c=2; if (ab) if (b0) c=0; else c++; printf(%d\n } 该程序的输出结果是
①  0
②  1
③  2
④  3
【单选题】 请阅读以下程序: main() {int a=5,b=0,c=0; if(a=b+c) printf(***\n else printf($$$\n
①  以上程序:有语法错误不能通过编译
②  可以通过编译但不能通过连接
③  输出***
④  输出$$$
【单选题】 以下程序的运行结果是:main){intk=4,a=3,b=2,c=;printf\n%d\n,k<a?k:c<b?c:a);}
①  4
②  3
③  2
④  1
随机题目
【单选题】
①  0
②  3
③  12
④  15
【单选题】 执行下面程序段后,输出字符B的个数是(   )x=0;while(x=5){printf("B");x+=2;}
①  0个
②  3个
③  5个
④  6个
【单选题】 若有定义:intx;charc=A;则正确的赋值表达式是()。(说明:A的ASCII码的十进制值为65,a的ASCII码的十进制值为97)
①  x=c+32
②  x=c+ABC
③  x=c+CBA
④  x=ABC
【单选题】
①  函数调用
②  int型表达式
③  double型表达式
④  非法表达式
【单选题】
①  charintlongint=folatdouble
【单选题】 对下面程序描述正确的是()。#includestdio.h#includestdlib.hvoidmain(){FILE*in,*out;if((in=fopen("file1.txt","a+"))==NULL){printf("cannotopenfile1\n");exit(0);}if((out=fopen("file2.txt","a+"))==NULL){printf("cannotopenfile2\n");exit(0);}while(!feof(out))fputc(fgetc(out),in);fclose(in);fclose(out);}
①  程序实现在屏幕上显示磁盘文件file1.txt的内容
②  程序实现将磁盘文件file2.txt复制到磁盘文件file1.txt
③  程序实现将两个磁盘文件file1.txt和file2.txt的内容合二为一
④  程序实现在屏幕上显示磁盘文件file2.txt的内容
【单选题】 以下程序运行后,a的值是()。main(){inta,b;for(a=1,b=1;aa++){if(b=20)break;if(b%3==1){b+=3;continue;}b-=5;}}
①  101
②  100
③  8
④  7
【单选题】 若有定义:inta=3;语句a+=a-=a*a;运行后,a的值为()。
①  0
②  -3
③  -12
④  -6
【单选题】 若有函数定义:intfunc(){staticintm=0;returnm++;}以下程序段运行后屏幕输出为()。inti;for(i=1;ii++)func();printf("%d",func());
①  0
②  1
③  4
④  5
【单选题】 设有说明intx=0,y=2;则执行if(x=0)y=1+x;elsey=x-1;后,变量y的值是(   )
①  -1
②  0
③  1
④  2