试题通
试题通
APP下载
首页
>
财会金融
>
c语言冲就完事了家人们
试题通
搜索
c语言冲就完事了家人们
题目内容
(
单选题
)
22.设有int a[10]={1,2,3,4,5,6,7,8,9,10},*p=&a[2];,则p[3]的值是______。

A、  5

B、  6

C、  7

D、  8

答案:B

试题通
c语言冲就完事了家人们
试题通
25.以读写方式打开一个已有的二进制文件data.bin,以下选项中正确的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-a938-c044-ce3414c8e900.html
点击查看题目
4.设有定义:int i=3480;,下列选项中,取i的十位上数字的表达式是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-7c28-c044-ce3414c8e900.html
点击查看题目
8.判断char型变量ch是否为小写字母的正确表达式是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2e08-c044-ce3414c8e901.html
点击查看题目
22.设有int a[10]={1,2,3,4,5,6,7,8,9,10},*p=&a[2];,则p[3]的值是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-a550-c044-ce3414c8e900.html
点击查看题目
10.执行以下程序段后,输出结果是______。
int x=3,y=10;
if (x=1) y=x;
y=y+1;
printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-83f8-c044-ce3414c8e902.html
点击查看题目
12.执行下列程序段后,屏幕输出结果是______。
int k=3;
for(;k<7;k++)
k++;
printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-de18-c044-ce3414c8e900.html
点击查看题目
9.以下程序段输出结果是______。
int x=0x41;
printf("%c",x+1);
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-da30-c044-ce3414c8e900.html
点击查看题目
11.设有int x=1,y=2,z;,则表达式z=x>y?x+y:x-y值为______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-8de0-c044-ce3414c8e900.html
点击查看题目
10.下列程序段输出的结果是______。
int x=5;
if(x=4) printf( );
else printf( );
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-89f8-c044-ce3414c8e901.html
点击查看题目
16.设有int a[6][6];,则存储在a[4][4]之前的元素个数为______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-eba0-c044-ce3414c8e901.html
点击查看题目
首页
>
财会金融
>
c语言冲就完事了家人们
题目内容
(
单选题
)
手机预览
试题通
c语言冲就完事了家人们

22.设有int a[10]={1,2,3,4,5,6,7,8,9,10},*p=&a[2];,则p[3]的值是______。

A、  5

B、  6

C、  7

D、  8

答案:B

试题通
试题通
c语言冲就完事了家人们
相关题目
25.以读写方式打开一个已有的二进制文件data.bin,以下选项中正确的是______。

A.   FILE *fp;fp=fopen("data.bin","rb+");

B.   FILE *fp;fp=fopen("data.bin","w");

C.   FILE *fp;fp=fopen("data.bin","a");

D.   FILE *fp;fp=fopen("data.bin","r");

解析:说明:(1) 要求使用循环实现;(2)输出结果保留5位小数,形式为
s=1.23456
参考程序:
#include
void main()
{
/*考生在此设计程序*/
int i,sum=0;
double s=0;
for(i=1;i<=2020;i++)
{
sum+=i;
s=s+1.0/sum;
}
printf("s=%.5lf\n",s);
}
综合应用题3:小明每天坚持跑步,6月份每天的跑步里程(单位:千米)记录在数组a中。计算并输出小明6月份跑步总里程和每天平均值(要求使用循环实现,结果保留2位小数)。
参考程序:
#include
void main()
{
/*小明6月份每天跑步里程*/
double a[30]={10.25,8.79,9.54,12.1,16.8,10.3,8.98,9.78,11.26,12.9,10.75,8.77,8.54,10.31,13.8,12.3,8.57,9.43,10.28,11.3,11.47,9.49,10.54,11.61,13.85,12.73,8.28,9.87,10.6,11.72};
/*考生在此行下设计程序,不得删除本行*/
double total=0,aver;
int i;
for(i=0;i<30;i++)
total+=a[i];
aver=total/30;
printf("小明6月份跑步总里程:%.2lf千米, 平均值:%.2lf千米\n",total,aver);
}
第四套

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-a938-c044-ce3414c8e900.html
点击查看答案
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
点击查看答案
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
点击查看答案
22.设有int a[10]={1,2,3,4,5,6,7,8,9,10},*p=&a[2];,则p[3]的值是______。

A.   5

B.   6

C.   7

D.   8

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-a550-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
点击查看答案
12.执行下列程序段后,屏幕输出结果是______。
int k=3;
for(;k<7;k++)
k++;
printf( );

A.   3

B.   6

C.   7

D.   8

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-de18-c044-ce3414c8e900.html
点击查看答案
9.以下程序段输出结果是______。
int x=0x41;
printf("%c",x+1);

A.   A

B.   a

C.   B

D.   c

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-da30-c044-ce3414c8e900.html
点击查看答案
11.设有int x=1,y=2,z;,则表达式z=x>y?x+y:x-y值为______。

A.   1

B.   2

C.   3

D.   -1

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-8de0-c044-ce3414c8e900.html
点击查看答案
10.下列程序段输出的结果是______。
int x=5;
if(x=4) printf( );
else printf( );

A.   TRUEFALSE

B.   FALSETRUE

C.   TRUE

D.   FALSE

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-89f8-c044-ce3414c8e901.html
点击查看答案
16.设有int a[6][6];,则存储在a[4][4]之前的元素个数为______。

A.   38

B.   29

C.   28

D.   30

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