
C语言题目
1、执行语句:printf("Theprogram\'snameisc:\\tools\book.txt");后的输出是2、已知:intd=-5;求:3>d<-1的值是3...
1、执行语句:
printf("The program\'s name is c:\\tools\book.txt");后的输出是
2、已知:int d=-5;求:3>d<-1 的值是
3、下面是把小写字母转换成大写字母的函数,请补充完整其中的return语句:
char UPPER(char c)
{
if(c>=’a’&&c<=’z’) return ;
return ;
}4、下面是s=1!+2!+3!+…+n!+(n+1)!的程序,请填写缺少的语句
#include <stdio.h>
long func(int n)
{ int x; long y;
y= ;
for(x=1; x<=n;x++) y= ;
return y;
}
void main( )
{ long s; int t, n;
scanf("%d",&n);
s= ;
for (t=1;t<=n;t++) s=s+ ;
printf("%d\n",s);
}5、下面程序的功能是将字符串s中所有的字符 e删除。请填写缺少的语句
#include <stdio.h>
void main( )
{ char s[80];
int i, j ;
gets (s);
for (i=j=0; ; i++)
if ( s[i]!= ‘e’) ;
s[j]='\0';
puts(s);
} 展开
printf("The program\'s name is c:\\tools\book.txt");后的输出是
2、已知:int d=-5;求:3>d<-1 的值是
3、下面是把小写字母转换成大写字母的函数,请补充完整其中的return语句:
char UPPER(char c)
{
if(c>=’a’&&c<=’z’) return ;
return ;
}4、下面是s=1!+2!+3!+…+n!+(n+1)!的程序,请填写缺少的语句
#include <stdio.h>
long func(int n)
{ int x; long y;
y= ;
for(x=1; x<=n;x++) y= ;
return y;
}
void main( )
{ long s; int t, n;
scanf("%d",&n);
s= ;
for (t=1;t<=n;t++) s=s+ ;
printf("%d\n",s);
}5、下面程序的功能是将字符串s中所有的字符 e删除。请填写缺少的语句
#include <stdio.h>
void main( )
{ char s[80];
int i, j ;
gets (s);
for (i=j=0; ; i++)
if ( s[i]!= ‘e’) ;
s[j]='\0';
puts(s);
} 展开
7个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |