APP下载
首页
>
文学知识
>
C语言程序设计题库
搜索
C语言程序设计题库
题目内容
(
单选题
)
3.下面函数定义中正确的是( )。

A、 double fun(double f1, double f2){ }

B、 double fun(double f1; double f2){ }

C、 double fun(double f1, double f2); { }

D、 double fun(double f1, f2){ }

答案:空

C语言程序设计题库
22.若有代数式,则不正确的C语言表达式是________。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-6f50-c003-bc7499099f00.html
点击查看题目
11.下面程序运行后输出的结果是________。
#include
int main()
{ int x=3;
do
{printf("%3d", x=x-3);
}while( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-dc68-c003-bc7499099f00.html
点击查看题目
1.2,12.1
第4章 分支结构程序设计
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-4a10-c003-bc7499099f02.html
点击查看题目
4.下面程序运行时输出结果是()。
#include
int k;
int fun( )
{ static int c=3;
return (
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f5-6a90-c003-bc7499099f01.html
点击查看题目
10.下面程序运行后输出的结果是________。
#include
int main()
{ int x=8;
for(;x>0;x--)
{if(x%3==0)
{printf( );
continue;
}
printf( );
}
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-d880-c003-bc7499099f00.html
点击查看题目
25.本程序的功能是:将一个字符串(串长不超过50)中连续的空格符值保留一个。例如,若字符串为“I am a student.”,处理后为“I am a student.”。
#include
#include
int main()
{char str[51]; int i;
gets( );
for(i=1; ( (64) ); i++)
if(str[i-1]==' '&&str[i]==' ')
{strcpy(str+i-1,( (65) ));
i--;
}
puts( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-64d8-c003-bc7499099f00.html
点击查看题目
45.下面定义中错误的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-a600-c003-bc7499099f02.html
点击查看题目
12.将一个整数插入到已经排好序的数组中,使该数组仍有序。
#include
int main()
{ int i,j,t,n,a[11]={12,31,5,7,19,4,8,16,32,42};
for(i=0;i<10;i++)
for(j=i+1;j<=10;j++)
if(( (28) ))
{t=a[i];a[i]=a[j];a[j]=t;}
printf( );
for(i=0;i<10;i++)
printf("%3d",a[i]);
printf( );
scanf( );
for(i=0;i<10;i++)
if( )
{for(j=9;j>=i;j--)
( (29) );
break; }
( (30) );
printf( );
for(i=0;i<=10;i++)
printf("%3d",a[i]);
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f3-dc20-c003-bc7499099f00.html
点击查看题目
11.3
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-7c48-c003-bc7499099f02.html
点击查看题目
12.已有定义“int a=2, b=3; float m=4.5, n=3.5;”,则表达式“( )( )/2+( )m%( )n”的值是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-2518-c003-bc7499099f03.html
点击查看题目
首页
>
文学知识
>
C语言程序设计题库
题目内容
(
单选题
)
手机预览
C语言程序设计题库

3.下面函数定义中正确的是( )。

A、 double fun(double f1, double f2){ }

B、 double fun(double f1; double f2){ }

C、 double fun(double f1, double f2); { }

D、 double fun(double f1, f2){ }

答案:空

分享
C语言程序设计题库
相关题目
22.若有代数式,则不正确的C语言表达式是________。

A.  x/b/c*y*6

B.  6*x*y/b/c

C.  6*x*y/b*c

D.  x*y/c/b*6

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-6f50-c003-bc7499099f00.html
点击查看答案
11.下面程序运行后输出的结果是________。
#include
int main()
{ int x=3;
do
{printf("%3d", x=x-3);
}while( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-dc68-c003-bc7499099f00.html
点击查看答案
1.2,12.1
第4章 分支结构程序设计
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-4a10-c003-bc7499099f02.html
点击查看答案
4.下面程序运行时输出结果是()。
#include
int k;
int fun( )
{ static int c=3;
return (
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f5-6a90-c003-bc7499099f01.html
点击查看答案
10.下面程序运行后输出的结果是________。
#include
int main()
{ int x=8;
for(;x>0;x--)
{if(x%3==0)
{printf( );
continue;
}
printf( );
}
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-d880-c003-bc7499099f00.html
点击查看答案
25.本程序的功能是:将一个字符串(串长不超过50)中连续的空格符值保留一个。例如,若字符串为“I am a student.”,处理后为“I am a student.”。
#include
#include
int main()
{char str[51]; int i;
gets( );
for(i=1; ( (64) ); i++)
if(str[i-1]==' '&&str[i]==' ')
{strcpy(str+i-1,( (65) ));
i--;
}
puts( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-64d8-c003-bc7499099f00.html
点击查看答案
45.下面定义中错误的是( )。

A.  int a=0xFF;

B.  double a=1.2e0.5;

C.  long a=2L;

D.  char a='\72';

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-a600-c003-bc7499099f02.html
点击查看答案
12.将一个整数插入到已经排好序的数组中,使该数组仍有序。
#include
int main()
{ int i,j,t,n,a[11]={12,31,5,7,19,4,8,16,32,42};
for(i=0;i<10;i++)
for(j=i+1;j<=10;j++)
if(( (28) ))
{t=a[i];a[i]=a[j];a[j]=t;}
printf( );
for(i=0;i<10;i++)
printf("%3d",a[i]);
printf( );
scanf( );
for(i=0;i<10;i++)
if( )
{for(j=9;j>=i;j--)
( (29) );
break; }
( (30) );
printf( );
for(i=0;i<=10;i++)
printf("%3d",a[i]);
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f3-dc20-c003-bc7499099f00.html
点击查看答案
11.3
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-7c48-c003-bc7499099f02.html
点击查看答案
12.已有定义“int a=2, b=3; float m=4.5, n=3.5;”,则表达式“( )( )/2+( )m%( )n”的值是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3ef-2518-c003-bc7499099f03.html
点击查看答案
试题通小程序
试题通app下载