4.设有定义:int i=3480;,下列选项中,取i的十位上数字的表达式是______。
A. i/10
B. i%10
C. i/10%10
D. i/100%10
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-7c28-c044-ce3414c8e900.html
点击查看答案
24.设有:
typedef struct ST
{
long a;
int b;
char c[2];
}NEW;
则下面叙述中正确的是_______。
A. ST是一个结构体类型变量
B. NEW是一个结构体类型
C. NEW是一个结构体变量
D. 以上的说明形式非法
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-fb40-c044-ce3414c8e901.html
点击查看答案
10.已知:int x;,语句if(x-1);中的表达式x-1等价于______。
A. x == 1
B. x != 1
C. x == 2
D. x != 2
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-da30-c044-ce3414c8e901.html
点击查看答案
3.下列定义变量的语句中错误的是______。
A. int _abc;
B. double int_;
C. char For;
D. float US%;
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-d048-c044-ce3414c8e902.html
点击查看答案
14.执行以下程序段后,输出的结果是______。
int i,j;
for(i=1;i<=3;i++)
{
for(j=1;j<=5;j++)
if(j%2==0) break;
printf( );
}
A. 1 1 1
B. 2 2 2
C. 1 3 5
D. 2 4 6
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-91c8-c044-ce3414c8e901.html
点击查看答案
13.while( )和下列_______等价。
A. while (leap!=0)
B. while (5)
C. while (leap==0)
D. while (0)
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-3bd8-c044-ce3414c8e901.html
点击查看答案
9.以下程序段输出结果是______。
int x=0x41;
printf("%c",x+1);
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-da30-c044-ce3414c8e900.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
点击查看答案
10.下列程序段输出的结果是______。
int a=5,b=4,c=3;
if( ) a=b+c,b=2*c;
else a=b-c,b=3*c;a=b+c;
printf( );
A. 9 6
B. 7 3
C. 1 9
D. 4 2
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-37f0-c044-ce3414c8e900.html
点击查看答案
15.下列对数组s的初始化,其中不正确的是______。
A. char s[5] = {"abc"};
B. char s[5] = { 'a', 'b', 'c'};
C. char s[5] = "";
D. char s[5] = "abcdef";
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-e5e8-c044-ce3414c8e900.html
点击查看答案