8.判断char型变量ch是否为小写字母的正确表达式是______。
A. 'a'<=ch<='z'
B. ('a'<=ch)||(ch<= 'z')
C. ('a'<=ch)&&(ch<='z')
D. ('a'<=ch) and (ch<='z')
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2e08-c044-ce3414c8e901.html
点击查看答案
14.执行以下程序段后,输出的结果是______。
int x=1,y=0;
while(x<=6)
{
x++;
if(x%3==0) continue;
y=y+x;
}
printf( );
A. 7,12
B. 6,18
C. 7,18
D. 6,21
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-39c0-c044-ce3414c8e901.html
点击查看答案
15.已知int a[8]={2,5,4,7,2,10};,则表达式a[5]-a[7]的值是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-3da8-c044-ce3414c8e900.html
点击查看答案
23.设有预处理命令
#define d 2
和定义
int a=10;
long b=20;
char c='a';
则下列语句中错误的是_______。
A. a++;
B. b++;
C. c++;
D. d++;
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-4f60-c044-ce3414c8e900.html
点击查看答案
12.若i为整型变量,则下列循环体执行次数是______。
for(i=2;i==0;) printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-3bd8-c044-ce3414c8e900.html
点击查看答案
6.已知int x=6,y=4,z=5;,执行语句y=z,z=x,x=y;后,变量x的值是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-8228-c044-ce3414c8e901.html
点击查看答案
13.执行以下程序段后,输出的结果是______。
int n=0,s=0;
while(s<10)
{ n++;s+=n; }
printf( );
A. 0,0
B. 4,10
C. 5,15
D. 10,4
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-e3d0-c044-ce3414c8e901.html
点击查看答案
17.下列程序段的运行结果是______。
char c[5]={'a','b','\0','c','\0'};
printf( );
A. 'a''b'
B. ab
C. ab c
D. ab\0c\0
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-9998-c044-ce3414c8e901.html
点击查看答案
11.在switch语句中,switch后面表达式值的类型不能是______。
A. int
B. double
C. char
D. long
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-37f0-c044-ce3414c8e901.html
点击查看答案
16.下列程序段的输出结果是_______。
int k,a[3][3]={1,2,3,4,5,6,7,8,9};
int s=0;
for(k=0;k<3;k++)
s=s+a[k][2-k];
printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-e5e8-c044-ce3414c8e901.html
点击查看答案