【单选题】【消耗次数:1】
下述程序的运行结果( )。 #includevoid main() { int n; for(n=1;nn++) { if(n%3==0)continue; printf(%d } }
12345678
124689
12457810
1234456
参考答案:
复制
纠错
相关题目
【单选题】 下述程序的运行结果( )。 #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 p,a=0; if(p=a!=0)printf(%d\n else printf(%d\n,p+2); }
①  1
②  2
③  3
④  5
【单选题】 下述程序的运行结果( )。 #includevoid main() { char ch; int i=0; for(ch=achzch++) { printf(%c ,ch); if(i%10==0) printf(\n } printf(\n }
①  a b c d e f g h i j k l m n o p q r s t u v w x y z
②  a b c d e f g h i j k l m n o p q r s t u v w x y z
③  a b c d e f g h i j k l m n o p q r s t u v w x y z
④  a b c d e f g h i j k l m n o p q r s t u v w x y z
【单选题】 下述程序的运行结果( )。 #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 n=4; while(n--) printf(%d\n,--n); }
①  2 0
②  1 0
③  2 1
④  3 0
【单选题】 下述程序的运行结果( )。 #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 x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); }
①  a=2,b=1
②  a=1,b=2
③  a=0,b=1
④  a=1,b=0
【单选题】 下述程序的运行结果( )。 #includevoid main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); } case 1:a++; case 2:a++;b++; } printf(a=%d,b=%d\n,a,b); }
①  a=1,b=1
②  a=2 ,b=1
③  a=2,b=2
④  a=3,b=3
随机题目
【单选题】 PID 控制算法中,微分调节器的主要作用是( )。
①  加快响应
②  提高稳定性
③  消除静差
④  减小振荡
【判断题】 现场总线系统采用一对一的设备连线,按控制回路分别进行连接,打破了传统控制系统的结构形式。
①  正确
②  错误
【单选题】 计算机控制系统实际运行时,需要由用户自行编写()。
①  实时软件
②  系统软件
③  开发软件
④  应用软件
【判断题】 直流伺服电动机具有较高的响应速度和精度以及良好的控制特性,同时直流伺服电机具有使用寿命长,无需维修等特点。
①  正确
②  错误
【判断题】 一般说来,全物理仿真较之计算机仿真在时间、费用和方便性上都具有明显的优点,是一种经济、快捷与实用的仿真方法。
①  正确
②  错误
【单选题】 使用测速电机作为检测装置,从而构成位置闭环的控制系统属于何种控制方式。( )
①  前馈
②  半闭环
③  闭环
④  开环
【判断题】 直线电动机具有结构简单、可实现直接驱动、高可靠性、易于维护等特点。
①  正确
②  错误
【判断题】 通用型计算机系统大多工作在为特定用户群设计的系统中,通常都具有低功耗、体积小、集成度高等特点。
①  正确
②  错误
【判断题】 步进电机在输入一个脉冲时所转过的角度称为步距角。
①  正确
②  错误
【判断题】 气压式伺服驱动系统常在定位精度较高的场合使用。
①  正确
②  错误