APP下载
首页
>
财会金融
>
c语言冲就完事了家人们
搜索
c语言冲就完事了家人们
题目内容
(
单选题
)
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

答案:A

c语言冲就完事了家人们
3.下列定义变量的语句中错误的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-d048-c044-ce3414c8e902.html
点击查看题目
19.已知一个程序如下:
#include
int a;
void main()
{
int b=2,c=5;
a=b*c;
printf( );
}
下面说法正确的______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-9d80-c044-ce3414c8e901.html
点击查看题目
18.以下正确的函数声明语句是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-ef88-c044-ce3414c8e901.html
点击查看题目
7.下列表达式中,______满足“当x为偶数时值为真,为奇数时值为假”的要求。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2e08-c044-ce3414c8e900.html
点击查看题目
15.以下选项中关于数组定义和初始化,正确的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-3fc0-c044-ce3414c8e901.html
点击查看题目
14.执行以下程序段后,输出的结果是______。
int a,b=0;
for(a=1;a<=5;a++)
{
if(b>=5) continue;
b=b+a;
}
printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-8bc8-c044-ce3414c8e901.html
点击查看题目
12.设有int i;,则以下循环中printf( );语句执行______。
for(i=2;i=0;i--)
printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-87e0-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( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-37f0-c044-ce3414c8e900.html
点击查看题目
19函数的形式参数的作用域是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-4790-c044-ce3414c8e900.html
点击查看题目
6.已知int i,a;,则执行语句i=(a=2*3,a*5),a+6;后,变量a的值是_______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2a20-c044-ce3414c8e901.html
点击查看题目
首页
>
财会金融
>
c语言冲就完事了家人们
题目内容
(
单选题
)
手机预览
c语言冲就完事了家人们

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

答案:A

c语言冲就完事了家人们
相关题目
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
点击查看答案
19.已知一个程序如下:
#include
int a;
void main()
{
int b=2,c=5;
a=b*c;
printf( );
}
下面说法正确的______。

A.   a是局部变量

B.   c是全局变量

C.   b是全局变量

D.   a是全局变量

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-9d80-c044-ce3414c8e901.html
点击查看答案
18.以下正确的函数声明语句是______。

A.   double fun(int x;y);

B.   double fun(int x;int y);

C.   double fun(int x,int y);

D.   double fun(int x,y);

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-ef88-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
点击查看答案
15.以下选项中关于数组定义和初始化,正确的是______。

A.   int a[5]={1,2,3,4,5};

B.   int a[5]=(1,2,3,4,5);

C.   int a[5]=0;

D.   int a[3]={1,2,3,4,5};

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-3fc0-c044-ce3414c8e901.html
点击查看答案
14.执行以下程序段后,输出的结果是______。
int a,b=0;
for(a=1;a<=5;a++)
{
if(b>=5) continue;
b=b+a;
}
printf( );

A.   6,15

B.   6,6

C.   3,6

D.   4,15

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-8bc8-c044-ce3414c8e901.html
点击查看答案
12.设有int i;,则以下循环中printf( );语句执行______。
for(i=2;i=0;i--)
printf( );

A.   无限次

B.   0次

C.   1次

D.   2次

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-87e0-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
点击查看答案
19函数的形式参数的作用域是______。

A.   本函数的全部范围

B.   本程序的全部范围

C.   本文件的全部范围

D.   从定义开始至本文件结束

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-4790-c044-ce3414c8e900.html
点击查看答案
6.已知int i,a;,则执行语句i=(a=2*3,a*5),a+6;后,变量a的值是_______。

A.   6

B.   12

C.   30

D.   36

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