编写一个函数,其功能是删除字符串中指定的字符

日期:2017-10-09 04:21:39 人气:1

编写一个函数,其功能是删除字符串中指定的字符

#include #include void Delete(char data[],char c) { int j,l,i=0; l= strlen(data); while(i<l && data[i]!=c) i++; if(i<l) for(j=i;j<=l;j++) data[j]=data[j+1]; printf("删除后的字符串是:\n"); for(i=0;i<
    A+
热门评论