【单选题】【消耗次数:1】
下列程序执行后的输出结果是________. #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=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=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=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=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=1,b=2,c=3; if(c=a)printf(%d\n else printf(%d\n }
①  1
②  3
③  5
④  6
【单选题】 若变量已正确定义,有以下程序段int a=3,b=5,c=7;if(ab)a=b;c=a;if(c!=a)c=b;;printf(%d,%d,%d\na,b,c)其输出结果是
①  语法错误
②  3,5,3
③  3,5,5
④  3,5,7
【单选题】 以下程序的输出结果是(  )。#include stdio.h void main( ){ int a,b;for(a=1,b=1;aa++){ if (b=10) break;if (b%5==1) { b+=5; continue; } }printf(%d\n }
①  101
②  6
③  4
④  3
【简答题】 以下程序的输出结果是[填空1]。#include stdio.h void main( ){ int a,b;for(a=1,b=1;aa++){ if (b=10) break;if (b%5==1) { b+=5; continue; } }printf(%d\n }
随机题目
【单选题】 下面程序段a=10;b=0;do{b+=2;a-=2+b;}while(a>=0);中循环的执行次数是()
①  10
②  3
③  5
④  4
【单选题】 下列()对结构类型变量定义是错误的。
①  struct teacher {int num; int age; } teach1;
②  struct {int num; int age; } teach1, teach2;
③  struct {int num; int age; } teacher; struct teacher teach1;
④  struct teacher {int num; int age; } ; struct teacher teach1;
【单选题】 若有说明int a[3][4];则对a数组元素的正确引用是()
①  a[2][4]
②  a(2)(1)
③  a[1+1][0]
④  a[1,3]
【单选题】 若a是单精度实型变量,c是基本整型变量,以下正确的输入语句是()
①  scanf(%f%d,a,c);
②  scanf(%f%d,&a,&c);
③  scanf(%f%f,&a,&c);
④  scanf(%d%f,&a,&c);
【单选题】 美国信息交换标准代码简称()。
①  ASCII码
②  BCD码
③  GB-32码
④  8421码
【单选题】 student是一个结构体类型,则结构体变量定义正确的是()
①  struct student a
②  a student
③  struct a
④  以上都不对
【单选题】 设变量定义为charformat[]=“s=%d\n”;则数组format中有()个元素。
①  4
②  5
③  6
④  7
【单选题】 下列数组定义、初始化或赋值语句中,正确的是()
①  intx[5]={1,2,3,4,5,6};
②  intn=8;intscore[n];
③  inta[8];a[8]=100;
④  intx[]={1,2,3,4,5,6};
【单选题】 若变量已正确定义,和语句“if(a>b)k=0;else k=1;”等价的是()
①  k=(a;b)?1:0;
②  k=a;b;
③  k=a;=b;
④  a;=b?0:1;
【单选题】 已知字母a的ASCII十进制代码为97,则执行下列语句后的输出结果为(). char a=a; a--; printf(%d,%c\n,a+2-0,a+3-0);
①  b,c
②  a--运算不合法,故有语法错
③  98,c
④  格式描述和输出项不匹配,输出无定值