软件水平习题练习

软件水平考试程序员易错题(2018/2/7)
1题:假定所有变量均已正确定义,下列程序段运行后X的值是( )
a=b=c=0; x=35;
if(!a)x--; else if(b);if(c)x=3;else x=4;
A、34
B、4
C、35
D、3
【单选题】:      

2题:1.main()
{ char str[]="1234567";
int i;
for(j=0;i<7;i十=3)
printf("%s\n",str+i);
【分析题】:

3题:设Ch是Char型变量,其值为’A’,则下面表达式的值是( )
ch=(ch>=’A’&&ch<=’Z’)?(ch+32):ch
A、’A’
B、’a’
C、’Z’
D、’z’
【单选题】:      

4题:执行下列程序段后的输出结果是( )
x=9;
while( x>7)
{ printf("*");x--;}
A、****
B、***
C、**
D、*
【单选题】:      

5题:conv(b)
int b;
{ if(b>=2)conv(b/2);
printf("%d",b%2);
return;

main()
{ int d;
scanf("%d",&d);
conv(d);

说明:本程序执行时从键盘上输入:22后跟回车键。
【分析题】:

 

您正在结束答题

请确认是否提交试卷?

继续做题 确认提交