题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-13 03:07:15

[填空题]下列程序的功能是将字符串s中所有的字符C删除。请填空。
#include<stdio.h>
main( )
char s[80];
int i,j;
gets(s);
for(i=j=0;s[i]!="/0";i++)
if([i]!=’C’)______;
s[j]=’/0’;
puts(s);

更多"下列程序的功能是将字符串s中所有的字符C删除。请填空。 #inclu"的相关试题:

[填空题]下列程序的功能是将字符串s中所有的字符c删除。请填空。 #include<stdio.h> main( ) {char s[80]; int i,j; gets(S); for(i=j0;s[i]!’/0’;i++) if(s[i]!=’c’)______; s[j]=’/0; puts(S); }
[填空题]下列程序的功能是将字符串s中所有的字符C删除。请填空。
#include<stdio.h>
main( )
char s[80];
int i,j;
gets(s);
for(i=j=0;s[i]!="/0";i++)
if([i]!=’C’)______;
s[j]=’/0’;
puts(s);

[填空题]下列程序的功能是将字符串s中所有的字符c删除。请填空。
#include<stdio.h>
main( )
char s[80];
int i,j;
gets(S);
for(i=j0;s[i]!’/0’;i++)
if(s[i]!=’c’)______;
s[j]=’/0;
puts(S);

[填空题]以下程序的功能是将字符串s中所有小写字母’a’删去,请填空。 #include<stdio.h> main( ) {char s[]="absuWWUDJFKFLaaakdK"; int i,j; for(i=j=0;s[i]!=’/0’;i++) if( ) s[j++]=s[i]; s[j]=’/0’; printf("%s",s); }
[填空题]下面程序的功能是将字符串a下标值为偶数的元素由小到大排序,其他元素不变,请填空。
#include<stdio.h>
main( )
char a[]="labchmfye",t;
int i,j;
for(i=0;i<7;i+=2)
for(j=i+2;j<9;______)
if(______)
t=a[i]; a[i]=a[j]; a[j]=t;j++;
puts(a);
printf("/n");

[填空题]下面程序的功能是调用sub函数计算数组a中字符串的长度,请填空。
sub(char s[])
int n;
for(n=0; 【18】 n++);
return 【19】

main( )
char*a;int k;
gets(a);
【20】
printf("%d",k);
[填空题]下列程序的功能是通过函数func输入字符并统计输入字符的个数。输入时用字符@作为输入结束标志,请填空。
#include<stdio.h>
long______;/*函数说明语句*/
main( )
long n;
n=func( );printf("n=%1d/n",n);

long func( )
long m;
for(m=0;getchar( )!=’@’;______);
return m;

[填空题]下面程序是把从终端读入的20个字符作为字符串放在字符数组中,然后利用指针变量输出上述字符串,请填空。
#include<stdio.h>
main( )
int i;char s[21],*p;
for(i=0;i<20;i++)
s[i]=getchar( );
s[i]= 【12】 ;
p= 【13】 ;
while(*p) putchar( 【14】 );

[填空题]下列程序的功能是对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。 #include<stdio.h> #include<ctype.h> main( ) char c; int a,s=0; while(______) if(isdigit(c)) a= c-’0’;s+=a; printf("s=%d",s);
[填空题]下列程序的功能是对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。
#include<stdio.h>
#include<ctype.h>
main( )
char c;
int a,s=0;
while(______)
if(isdigit(C) )
a=c-’0’;s+=a;
printf("s=%d",s);

[填空题]下列程序的功能:对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。
#include<stdio.h>
#include<ctype.h>
main( )
char c;
int a,s=0;
while(______)
if(isdigit(c))
a=c-’0’;s+=a;
printf("s=%d",s);

[填空题]下列程序的功能是对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。 #include<stdio.h> #include<ctype.h> main( ) { char c; int a,s=0; while(______) if(isdigit(C) ) {a=c-’0’;s+=a;} printf("s=%d",s); }

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码