C语言删除字符串中某个字母
void del(char *s,char ch)
{
int j= 0;
for (int i = 0; s[i] != '\0'; i++) {
if (s[i]!=ch){ //判断是否为删除字符
s[j++] = s[i];
}
}
s[j] = '\0';
}
int main(){
char s[80]="Student",ch;
scanf("%c",&ch);
del(s,ch);
printf("%s",s);
return 0;
}