#include <stdio.h>
void delch(char *str, char c) {
char *p = str;
while (*str) {
if (*str != c) {
*p++ = *str;
}
str++;
}
*p = '\0';
}
void main() {
char s1[100] = "AABCD123ABCD123ABCDA";
char c = 'A';
delch(s1, c);
puts(s1);
}
来源:CSDN
作者:轻松的小希
链接:https://blog.csdn.net/qq_38490457/article/details/104633298