试题通
试题通
APP下载
首页
>
财会金融
>
c语言冲就完事了家人们
试题通
搜索
c语言冲就完事了家人们
题目内容
(
单选题
)
2.下列选项中,表达式______值为1。

A、  1-'0'

B、  1-'\0'

C、  '1'-0

D、  '\0'-'0'

答案:B

试题通
c语言冲就完事了家人们
试题通
25.对文件操作的一般步骤是_______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-4f60-c044-ce3414c8e902.html
点击查看题目
21.设有定义:float a=3;,则对实型指针变量p的定义和初始化正确的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-4b78-c044-ce3414c8e900.html
点击查看题目
12.执行下列程序后,输出的结果是______。
#include
void main( )
{
int i,s=0;
for(i=1;i<10;i+=2)
s+=i+1;
printf( );
}
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-e3d0-c044-ce3414c8e900.html
点击查看题目
8.已知int x=1,y=2,z=3;,则下列表达式值为0的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-83f8-c044-ce3414c8e900.html
点击查看题目
1.计算机能直接执行的程序是_______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2250-c044-ce3414c8e900.html
点击查看题目
15.下列对数组s的初始化,其中不正确的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fa-e5e8-c044-ce3414c8e900.html
点击查看题目
16.设有int a[6][6];,则存储在a[4][4]之前的元素个数为______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-eba0-c044-ce3414c8e901.html
点击查看题目
12.下面有关for循环的描述正确的是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-35d8-c044-ce3414c8e901.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
点击查看题目
6.若定义:int i=4,j=5;,则表达式i+=i*=i+j的值是______。
https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-d818-c044-ce3414c8e900.html
点击查看题目
首页
>
财会金融
>
c语言冲就完事了家人们
题目内容
(
单选题
)
手机预览
试题通
c语言冲就完事了家人们

2.下列选项中,表达式______值为1。

A、  1-'0'

B、  1-'\0'

C、  '1'-0

D、  '\0'-'0'

答案:B

试题通
试题通
c语言冲就完事了家人们
相关题目
25.对文件操作的一般步骤是_______。

A.   读写文件->打开文件->关闭文件

B.   读文件->写文件->关闭文件

C.   打开文件->操作文件->关闭文件

D.   操作文件->打开文件->关闭文件

解析:说明:(1) 要求使用循环实现;(2)输出结果形式为:
n=1234
参考程序一:
#include
void main()
{
/*考生在此行下设计程序,不得删除本行*/
int s=0,n=0;
while(s<=20202020)
{
n=n+1;
s+=2*n;
}
printf("n=%d\n",n);
}
综合应用题3:2020年新冠肺炎疫情期间,武汉某医院4月份每天治愈病人数存储在数组a中,计算并输出该院4月份累计治愈病人总数和每天治愈病人数的平均值(要求使用循环实现,平均值结果保留2位小数)。
参考程序:
#include
void main()
{
int a[30]={11,15,17,20,31,12,45,56,65,81,68,83,69,62,90,

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-4f60-c044-ce3414c8e902.html
点击查看答案
21.设有定义:float a=3;,则对实型指针变量p的定义和初始化正确的是______。

A.   float *p=a;

B.   float p=a;

C.   float *p=&a;

D.   float *p=*a;

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-4b78-c044-ce3414c8e900.html
点击查看答案
12.执行下列程序后,输出的结果是______。
#include
void main( )
{
int i,s=0;
for(i=1;i<10;i+=2)
s+=i+1;
printf( );
}

A.   s=30

B.   s=25

C.   s=55

D.   s=45

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fb-e3d0-c044-ce3414c8e900.html
点击查看答案
8.已知int x=1,y=2,z=3;,则下列表达式值为0的是______。

A.   x&&y

B.   x<=y

C.   x||y

D.   x<=y-z

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-83f8-c044-ce3414c8e900.html
点击查看答案
1.计算机能直接执行的程序是_______。

A.   可执行程序

B.   目标程序

C.   源程序

D.   汇编程序

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-2250-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
点击查看答案
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
点击查看答案
12.下面有关for循环的描述正确的是______。

A.   for循环只能用于循环次数已经确定的情况

B.   for循环先执行循环体语句,后判断条件

C.   在for循环中不能用break语句跳出循环体

D.   for循环体中,可以包含多条语句

https://www.shititong.cn/cha-kan/shiti/0005e1ce-a8fc-35d8-c044-ce3414c8e901.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
点击查看答案
6.若定义:int i=4,j=5;,则表达式i+=i*=i+j的值是______。

A.   25

B.   42

C.   40

D.   72

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