软件水平习题练习

软件水平考试程序员易错题(2018/4/17)
1题:设x和y为int型变量,则执行下面的循环后,y的值为( )
for(y=l, x=l; y<=50; y++){
if(x>=10) break;
if(x%2==1){ x+=5; continue;}
X -= 3;
}
A、2
B、4
C、6
D、8
【单选题】:      

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

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

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

3题:下列关于结构型变量的定义语句中,错误的是( )
A、typedef structCCC
B、#define GGG struct
{ char name[20];GGGCCC、{ char name[20];
int age; int age;
}GGG;           };
GGG abc ; GGGCCC、abc;
C、struct
D、struct
{ char name[20]; { char name[20];
int age; int age;
}ccc;        }abc;
CCC、abc;
【单选题】:      

4题:在计算机上可以直接运行的程序是写( )
A、高级语言程序
B、汇编语言程序
C、机器语言程序
D、C语言源程序
【单选题】:      

5题:设a,b为字符型变量,执行"scanf("a=%c,b=%c",&a,&b)"后使a为'A',b为'B',从键盘上的正确输入是( )
A、’A”B’
B、’A’,’B’
C、A=A,B=B
D、a=
A、b=B
【单选题】:      

 

您正在结束答题

请确认是否提交试卷?

继续做题 确认提交