c:踢掉字符串中的指定字符
#include<stdio.h>
#include<stdlib.h>
int main(void){
char s[] = "hello";
char d = 'l';
int i,j;
for(i=j=0;s[i]!='\0';i++){
if(s[i]!=d){
s[j++] = s[i];
}
}
s[j] = '\0';
printf("the power number is: %s",s);
system("pause");
}

浙公网安备 33010602011771号