#include<stdio.h>
int main(){
char str[10]="asdfghjkl",c,i,j;
printf("原字符串为:%s\n特定字符为:",str);
scanf("%c",&c);
for(i=0;i<10;i++)
if(str[i]==c){
for(j=i;j<10;j++)
str[j]='\0';
}printf("删除后的字符串为:%s",str);
return 0;
}
11-06
2913
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-12
1315
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交