题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-23 10:58:12

[填空题]以下程序的功能是:删除字符串中所有的空格。请填空。 #include<stdio.h> main( ) { char s[100]={"Our teacher teach C language!"}; int i, j;  for(i=j=0; s[i]!=’/0’; i++)   if(s[i]!=’’) {s[j]=s[i]; j++;}  s[j]=______;  printf("%s/n", s); }

更多"以下程序的功能是:删除字符串中所有的空格。请填空。 #includ"的相关试题:

[填空题]以下程序的功能是:删除字符串中所有的空格。请填空。
#include<stdio.h>
main( )
char s[100]="Our teacher teach C language!"; int i, j;
 for(i=j=0; s[i]!=’/0’; i++)
  if(s[i]!=’’) s[j]=s[i]; j++;
 s[j]=______;
 printf("%s/n", s);

[填空题]以下程序的功能是计算字符串的长度。请填空。 #include<stdio.h> main( ) {char str[100],*sp=str; int nlen=0; scanf("%s",str); for(;*sp!=’/0’;sp++)______; printf("%d",nlen); }
[填空题]下面程序的功能是将字符串s中所有的字符a删除。请填空。 #include<stdio.h> void main( ) {char s[80]; int i,j=0; gets(s); for(i=0;s[i]!=’/0’;i++) if(s[i]!=’a’)______; 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(s[i]!=’c’)______; s[j]=’/O’; 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=j=0;s[i] !=’/0’;i++)
if(s[i] !=’c’)______;
s[j]=’/0’;
puts(s);

[填空题]以下程序用以删除字符串所有的空格,请填空。
#include <stdio.h>
main( )
char s[100]= "Our teacher teach C language!");int i,j;
for(i=j=0;s[i]!=’/0’;i++)
if(s[i]!=’’)s[j]=s[i];j++;
s[j]=______;
printf("%s/n",s);

[填空题]下面程序的功能是输出两个字符串中对应相等的字符。请填空。
#include <stdio.h>
char x[]="programming";
char y[]="Fortran";
main( )
int i=0;
while(x[i]!=’/0’&&y[i]!=’/0’)
if(x[i]==y[i])
printf("%c",______);
else
i++;

[填空题]以下程序用以删除字符串中所有的空格,请填空。
#include <stdio.h>
main( )
char s[100]="our teacher teach c language!”;int i,j;
for(i=j=0;s[i]!=’/0’;i++)
if(s[i]!=’’) s[j]=s[i];j++;
s[j]=______;
printf("%s/n",s);

我来回答:

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

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码