2.若有定义
int a;
float b;
double c;
程序运行时输入:3 4 5<回车>
能把3 输入给变量a、4 输入给变量b、5 输入给变量c 的语句是_____。
A. scanf("%d%f%f",&a,&b,&c);
B. scanf("%d%lf%lf",&a,&b,&c);
C. scanf("%lf%lf%lf",&a,&b,&c);
D. scanf("%d%f%lf",&a,&b,&c);
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-7a58-c044-ce3414c8e901.html
点击查看答案
17.以下程序段的输出结果是______。
char s[]="Hello World!";
strlwr( );
printf( );
A. hello world!
B. HELLO world!
C. hello WORLD!
D. HELLO WORLD!
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-9398-c044-ce3414c8e901.html
点击查看答案
8.下列运算符中优先级最高的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-8610-c044-ce3414c8e901.html
点击查看答案
6.逗号表达式“(a=3*5,a*4),a+15”的值是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-8010-c044-ce3414c8e900.html
点击查看答案
4.已知int i=10,j=6;,则执行i%=j+1;后,i的值是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-ce78-c044-ce3414c8e901.html
点击查看答案
10.执行以下程序段后,输出结果是______。
int x1=1,x2=2,t=1;
if (x1=x2) t=10;
printf("%d,%d\n",x1,t);
A. 1,1
B. 1,10
C. 2,10
D. 2,1
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-31f0-c044-ce3414c8e901.html
点击查看答案
3.以下选项中,不能作为C语言合法标识符的是______。
A. Myscore2
B. Myscore2
C. Myscore-2
D. Myscore_2
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-ce78-c044-ce3414c8e900.html
点击查看答案
5.设有定义:int a=20,b;,则执行语句b=a++;后,a、b的值分别是______。
A. 20,21
B. 21,20
C. 20,20
D. 21,21
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-d260-c044-ce3414c8e900.html
点击查看答案
10.执行以下程序段后,输出结果是______。
int x=3,y=10;
if (x=1) y=x;
y=y+1;
printf( );
A. 3,11
B. 3,10
C. 3,4
D. 1,2
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-83f8-c044-ce3414c8e902.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
点击查看答案