APP下载
首页
>
财会金融
>
c语言冲就完事了家人们
搜索
c语言冲就完事了家人们
题目内容
(
单选题
)
7.以下程序段的输出结果是______。
char c1='b',c2='C';
printf("%d,%c\n",c1-32,c2+32);

A、  66,C

B、  66,c

C、  98,C

D、  98,c

答案:B

c语言冲就完事了家人们
7.设有char a='0'; int b;,执行语句b=a+2;后,正确的描述是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-d818-c044-ce3414c8e901.html
点击查看题目
23.下列程序输出的结果为______。
#include
#define M( ) x*(x+1)
void main( )
{
int a=2,b=3;
printf(
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-fb40-c044-ce3414c8e900.html
点击查看题目
16.设有定义:int a[3][3]={{1},{2}},b[3][3]={1,2};,则执行语句printf("%d",a[1][0]+b[0][0]);后,输出的结果是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-43a8-c044-ce3414c8e900.html
点击查看题目
20.执行以下程序后,输出结果是______。
#include
void fun( )
{
a=23; b=56;
}
void main( )
{
int x=10, y=20;
fun( );
printf( );
}
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-4578-c044-ce3414c8e901.html
点击查看题目
4.设有整型变量x,y,下列选项中,与表达式x*y/5值相同的表达式是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-2c38-c044-ce3414c8e900.html
点击查看题目
25.以读写方式打开一个已有的二进制文件data.bin,以下选项中正确的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-a938-c044-ce3414c8e900.html
点击查看题目
8.设有int a=3,b=4;,以下不合法的C语言语句是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-3408-c044-ce3414c8e900.html
点击查看题目
20.以下关于函数参数值传递叙述正确的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-a168-c044-ce3414c8e900.html
点击查看题目
8.判断char型变量ch是否为小写字母的正确表达式是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2e08-c044-ce3414c8e901.html
点击查看题目
3.下面标识符中合法的用户标识符为______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-7e40-c044-ce3414c8e900.html
点击查看题目
首页
>
财会金融
>
c语言冲就完事了家人们
题目内容
(
单选题
)
手机预览
c语言冲就完事了家人们

7.以下程序段的输出结果是______。
char c1='b',c2='C';
printf("%d,%c\n",c1-32,c2+32);

A、  66,C

B、  66,c

C、  98,C

D、  98,c

答案:B

c语言冲就完事了家人们
相关题目
7.设有char a='0'; int b;,执行语句b=a+2;后,正确的描述是______。

A.   b的值变为字符型

B.   C语言不允许字符型和整型相加

C.   b的值是2

D.   b的值是字符'0'的ASCII码值加上2

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-d818-c044-ce3414c8e901.html
点击查看答案
23.下列程序输出的结果为______。
#include
#define M( ) x*(x+1)
void main( )
{
int a=2,b=3;
printf(

A.   17

B.   20

C.   25

D.   30

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-fb40-c044-ce3414c8e900.html
点击查看答案
16.设有定义:int a[3][3]={{1},{2}},b[3][3]={1,2};,则执行语句printf("%d",a[1][0]+b[0][0]);后,输出的结果是______。

A.   0

B.   1

C.   2

D.   3

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-43a8-c044-ce3414c8e900.html
点击查看答案
20.执行以下程序后,输出结果是______。
#include
void fun( )
{
a=23; b=56;
}
void main( )
{
int x=10, y=20;
fun( );
printf( );
}

A.   23,56

B.   56,23

C.   10,20

D.   20,10

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-4578-c044-ce3414c8e901.html
点击查看答案
4.设有整型变量x,y,下列选项中,与表达式x*y/5值相同的表达式是______。

A.   x/5*y

B.   (x*y)/5

C.   (x/5)*(y/5)

D.   x*(y/5)

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-2c38-c044-ce3414c8e900.html
点击查看答案
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
点击查看答案
8.设有int a=3,b=4;,以下不合法的C语言语句是______。

A.   a=b==4;

B.   a=b%3.5;

C.   a=b=4;

D.   a+=a+3;

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-3408-c044-ce3414c8e900.html
点击查看答案
20.以下关于函数参数值传递叙述正确的是______。

A.   函数参数值传递是将形参的值传递给实参

B.   函数参数值传递是单向数据传递方式

C.   函数参数值传递的特点是形参和实参占用了相同的存储空间

D.   函数参数值传递实现了函数内部数据向外传递

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-a168-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
点击查看答案
3.下面标识符中合法的用户标识符为______。

A.   P#Ad

B.   12a

C.   char

D.   _int

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