第四届全国ITAT教育工程就业技能大赛预赛试题84993949
、单选题(共60小题,每题1分,共60分)
执行下列程序中的输出语句后,x的值是______.(知识点3.10)
n()
t x ;
ntf(“%d\\n”,(x=5*6,x*2,x+20));}
30 B)60 C)50 D)80
下列程序的输出结果是_______.(知识点3.8)
n()
t x=1,y=0,z;
(x<=0)&&(y- ->=0);
ntf(“%d %d% d%\\n”,z,x,y) ;}
0 -1 -1 B)0 -1 0 C)0 1 0 D)0 1 -1
在C语言中,下列选项属于合法的长整型常数的是_______.(知识点3.3)
0L B)1234567 C)0.0234567 D)3.14159e3
下列选项中属于不正确的赋值语句的是_____. (知识点3.6)
t++; B)n1=(n2=(n3=0)); C)k=i= =j; D)a=b,c=1;
若有定义:int a,b;char x,y;并有以下输入数据: 14 22 XxYy (回车)
能给a赋整数14,给b赋整数22,给x赋字符x,给y赋字符y的正确程序段是________. (知识点4.2)
scanf(“%d %d”,&a,&b);
etchar();y=getchar();
scanf(“%d%d %c %c”, &a, &b,&x,&x,&y,&y);
scanf(“%d %d %c%c%c %c”, &a,&b,&x,&x,&y,&y);
scanf(“%d%d %c %c”, &a, &b,&x,&y);
下列转义字符不正确的是_______.(知识点3. 5)
'\\\\' B)'\\' C)'\\053' D)'\\0'
下列选项可作为C语言赋值语句的是_______.(知识点4.2)
x=3,y=5 B)a=b=6 C)i- -; D)y=int(x);
当c的值不为0时,下列选项中能正确将c的值赋给变量a、b的是_______.(知识点5.2)
c=b=a; B)(a=c)‖(b=c); C)(a=c)&&(b=c); D)a=c=b;
有以下程序:
n()
nsigned int a ;
b=-1;
;
ntf(“%u”,a);}
程序运行后的输出结果是_______.(知识点4.5)
-1 B)65535 C)32767 D)-32768
若x、b、m、n均为int型变量,执行下面语句后b的值为_______.(知识点3.10)
0;n=6;
(- -m= =n++)?- -m:++n;
++;
11 B)6 C)19 D)18
有以下程序:
n()
nt a=111,b=222;
ntf(“%d\\n”,a,b);
程序运行后的输出结果是_______.(知识点4.5)
错误信息 B)111 C)222 D)111,222
以下程序的输出结果是_______.(知识点4.5)
n()
nt a=2,c=5;
ntf(“a=%%%d,b=%%%d\\n”,a,c);}
a=%2,b=%5 B) a=2,b=5 C) a=%%%d,b=%%%d D) a=%%d,b=%%d
关于浮点型变量f,能实现对f中的值在小数点后第三位进行四舍五入的表达式是_______.(知识点3.8)
f=(f*100+0.5)/100.0 B)f=(f*100+0.5)/100
f=(int)(f*100+0.5)/100.0 D)f=(f/100+0.5)*100
设 a=5, b=6, c=7, d=8, m=2, n=2, 执行(m=a>b)&&(n=c>d) 后m,n的值为______.(知识点5.2)
2,2 B) 2,0 C) 0,2 D) 0,0
语句printf(“%d\\n”,strlen(“asd\\n\\x12\\1\\\\”));的输出结果是______.(知识点7.3)
9 B) 11 C) 7 D) 8
有以下程序:
n( )
y=1234;
ntf(“y=m”,y);
ntf(“y=%+06d\\n”,y);
第四届全国ITAT教育工程就业技能大赛预赛试题84993949



