试题通
试题通
APP下载
首页
>
文学知识
>
C语言程序设计题库
试题通
搜索
C语言程序设计题库
题目内容
(
单选题
)
1.0 1 32.33.104.8 10

答案:空

试题通
C语言程序设计题库
试题通
13.执行程序段“int a, b; a=b=4; a+=b%3;”后,变量a, b的值分别是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-2900-c003-bc7499099f00.html
点击查看题目
19.已有预处理命令“#include”和声明“int x=4, y;”,下面语句中语法正确的是()。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-20e8-c003-bc7499099f01.html
点击查看题目
13.5432114.0 -6 9 6 115.2#18#16.30
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f2-6138-c003-bc7499099f01.html
点击查看题目
1.( )0( )连续 数组名( )越界
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-7478-c003-bc7499099f00.html
点击查看题目
5.double6.float7.double8.8
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-d0f8-c003-bc7499099f01.html
点击查看题目
13.sqrt( )/( )14.sqrt( (
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-4628-c003-bc7499099f00.html
点击查看题目
35.下列正确的字符串常量是________。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-8e90-c003-bc7499099f00.html
点击查看题目
3.下列一维数组的声明中正确的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f2-a788-c003-bc7499099f01.html
点击查看题目
20.本程序的功能是:求数组中前4个元素之和及后6个元素之和。
#include
int sum( )
{ int i, sum=0;
for(i=0;i<n; i++)
( (53) );
return( );
}
int main()
{ int a[15]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,15},sumh, sumt;
sumh=sum(a, 4);
sumt=sum(( (54) ),6);
printf( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f7-00d0-c003-bc7499099f00.html
点击查看题目
3.编写程序,输入一个形式如“操作数 运算符 操作数”的四则运算表达式,输出运算结果。若运算符为'/'时,能处理除数为0的情况。
#include
int main( )
{ char operator; double value1, value2;
printf( );
scanf("%lf%c%lf", &value1, &operator, &value2);
switch( )
{ case '+':
printf("=%.2f\n", value1+value2); break;
case '-':
printf("=%.2f\n", value1-value2); break;
case '*':
printf("=%.2f\n", value1*value2); break;
case '/':
if(value2==0)
printf("Cannot divide into 0");
else
printf("=%.2f\n", value1/value2); break;
default:
printf( ); break;
}
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-6f08-c003-bc7499099f00.html
点击查看题目
首页
>
文学知识
>
C语言程序设计题库
题目内容
(
单选题
)
手机预览
试题通
C语言程序设计题库

1.0 1 32.33.104.8 10

答案:空

试题通
分享
试题通
试题通
C语言程序设计题库
相关题目
13.执行程序段“int a, b; a=b=4; a+=b%3;”后,变量a, b的值分别是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-2900-c003-bc7499099f00.html
点击查看答案
19.已有预处理命令“#include”和声明“int x=4, y;”,下面语句中语法正确的是()。

A.  if(x%2=1)y=x;

B.  if(sqrt(x)%2)y=x;

C.  if(x==1)y=x;

D.  if(x==1)y=&x;

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-20e8-c003-bc7499099f01.html
点击查看答案
13.5432114.0 -6 9 6 115.2#18#16.30
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f2-6138-c003-bc7499099f01.html
点击查看答案
1.( )0( )连续 数组名( )越界
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-7478-c003-bc7499099f00.html
点击查看答案
5.double6.float7.double8.8
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-d0f8-c003-bc7499099f01.html
点击查看答案
13.sqrt( )/( )14.sqrt( (
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-4628-c003-bc7499099f00.html
点击查看答案
35.下列正确的字符串常量是________。

A.  'abc'

B.  '\t'

C.  "\\t"

D.  97

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-8e90-c003-bc7499099f00.html
点击查看答案
3.下列一维数组的声明中正确的是( )。

A.  int a[];

B.  int n=5,a[n];

C.  int a[4+1]={0};

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

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f2-a788-c003-bc7499099f01.html
点击查看答案
20.本程序的功能是:求数组中前4个元素之和及后6个元素之和。
#include
int sum( )
{ int i, sum=0;
for(i=0;i<n; i++)
( (53) );
return( );
}
int main()
{ int a[15]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,15},sumh, sumt;
sumh=sum(a, 4);
sumt=sum(( (54) ),6);
printf( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f7-00d0-c003-bc7499099f00.html
点击查看答案
3.编写程序,输入一个形式如“操作数 运算符 操作数”的四则运算表达式,输出运算结果。若运算符为'/'时,能处理除数为0的情况。
#include
int main( )
{ char operator; double value1, value2;
printf( );
scanf("%lf%c%lf", &value1, &operator, &value2);
switch( )
{ case '+':
printf("=%.2f\n", value1+value2); break;
case '-':
printf("=%.2f\n", value1-value2); break;
case '*':
printf("=%.2f\n", value1*value2); break;
case '/':
if(value2==0)
printf("Cannot divide into 0");
else
printf("=%.2f\n", value1/value2); break;
default:
printf( ); break;
}
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-6f08-c003-bc7499099f00.html
点击查看答案
试题通小程序
试题通app下载