APP下载
首页
>
财会金融
>
c语言冲就完事了家人们
搜索
c语言冲就完事了家人们
题目内容
(
单选题
)
12.设有int i;,则以下循环中printf( );语句执行______。
for(i=2;i=0;i--)
printf( );

A、  无限次

B、  0次

C、  1次

D、  2次

答案:B

c语言冲就完事了家人们
8.判断char型变量ch是否为小写字母的正确表达式是______。
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( );
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';
则下列语句中错误的是_______。
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( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-e3d0-c044-ce3414c8e901.html
点击查看题目
17.下列程序段的运行结果是______。
char c[5]={'a','b','\0','c','\0'};
printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-9998-c044-ce3414c8e901.html
点击查看题目
11.在switch语句中,switch后面表达式值的类型不能是______。
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
点击查看题目
首页
>
财会金融
>
c语言冲就完事了家人们
题目内容
(
单选题
)
手机预览
c语言冲就完事了家人们

12.设有int i;,则以下循环中printf( );语句执行______。
for(i=2;i=0;i--)
printf( );

A、  无限次

B、  0次

C、  1次

D、  2次

答案:B

c语言冲就完事了家人们
相关题目
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]的值是______。

A.   10

B.   -10

C.   2

D.   -2

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( );

A.   2次

B.   1次

C.   0次

D.   无限次

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的值是______。

A.   0

B.   5

C.   6

D.   7

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( );

A.   15

B.   6

C.   12

D.   45

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-e5e8-c044-ce3414c8e901.html
点击查看答案
试题通小程序
试题通app下载