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

[填空题]下面程序的功能是将字符串a下标值为偶数的元素由小到大排序,其他元素不变,请填空。
#include<stdio.h>
main( )

char a[]="labchmfye",t:
int 1,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");

更多"下面程序的功能是将字符串a下标值为偶数的元素由小到大排序,其他元素不变"的相关试题:

[填空题]下面程序的功能是将字符串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; 【15】 )
if( 【16】 )
t=a[i]; a[i]=a[j]; a[j]=t;j++;
puts(a);
printf("/n");

[填空题]下面程序的功能是将字符串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);

[填空题]以下程序能将字符串Program!反向打印出来,请填空。 #include<stdio.h> void out(char *str) {char *s=______;/*第一空*/ if(*s==NULL)return: while(______)s++;/*第二空*/ s--; printf("%c/n",*s); ______=NULL;/*第三空*/ out(str); } main( ) {char c[]="Program!"; out(c);}
[填空题]下列程序的功能是将字符串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);

[填空题]以下程序的功能是将字符串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);

[填空题]下面程序的功能是将字符串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’) 【10】 ; s[j]=’/0’; puts(s); }

我来回答:

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

订单号:

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