用C语言在字符串中删除指定的字符。

[复制链接]
查看11 | 回复2 | 2016-5-17 22:32:54 | 显示全部楼层 |阅读模式
#include "stdio.h"#include int main(){ char a[50],ch;int i,j;printf("输入字符串:");scanf("%s",a);fflush(stdin); printf("输入要删的字符:");scanf("%c",&ch);for(i=0,j=0;i#include #define N 10void main(){ char ch[N]={'0'}; char move;//指定要删除的字符 printf("please input a string:"); gets(ch); prin
回复

使用道具 举报

千问 | 2016-5-17 22:32:54 | 显示全部楼层
char* DelStr(char* str1, char* str2){int i,j;int iLen1,iLen2;int iFlag,iPos;char s1[128+1],s2[128+1];memset(s1,0x00,sizeof(s1));memset(s2,0x00,sizeof(s2
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行