21.设有定义:float a=3;,则对实型指针变量p的定义和初始化正确的是______。
A. float *p=a;
B. float p=a;
C. float *p=&a;
D. float *p=*a;
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-4b78-c044-ce3414c8e900.html
点击查看答案
15.设有定义:int a[5];,则对a数组元素引用不正确的是______。
A. a[5]
B. a[3*1]
C. a[10-10]
D. a[3+1]
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-8fb0-c044-ce3414c8e900.html
点击查看答案
9.以下程序段输出结果是______。
int x=0x61;
printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-31f0-c044-ce3414c8e900.html
点击查看答案
4.设有定义:int k=0;,以下选项的四个表达式中,与其他三个表达式的值不相同的是______。
A. ++k
B. k++
C. k+1
D. k+=1
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2638-c044-ce3414c8e901.html
点击查看答案
7.已知int x=10;float y=20;double z=30;,则表达式x+y+z的数据类型是______。
A. int
B. float
C. double
D. 无法确定
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-8610-c044-ce3414c8e900.html
点击查看答案
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
点击查看答案
8.若变量c为char类型,以下不能正确判断其为大写字母的表达式是______。
A. 'A'<=c<='Z'
B. c>='A'&&c<='Z'
C. (c+32)>= 'a'&&(c+32)<= 'z'
D. !(c<'A'||c>'Z')
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-d648-c044-ce3414c8e901.html
点击查看答案
7.下列表达式中,______满足“当x为偶数时值为真,为奇数时值为假”的要求。
A. x%2==0
B. x%2==1
C. x%2!=0
D. x%2
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2e08-c044-ce3414c8e900.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
点击查看答案
14.执行以下程序段后,输出的结果是______。
int x=1;
while(1)
{
if(x==6) break;
x++;
}
printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-e200-c044-ce3414c8e901.html
点击查看答案