#include<stdlib.h>
char a[8] = {'a','d','c','1','2','e','3','a'};
void deleNum(char* a, int len){
char*p = a;
char*q = a;
int i =0;
for(; i < len; i++){
if(a[i] >='0' && a[i] <= '9'){
p++;
}else{
*q++ = *p++;
}
}
*q++ = '\0';
}
int main(){
deleNum(a,8);
printf("%s", a);
getchar();
}
Delete numbers in a string
最新推荐文章于 2024-05-24 08:20:13 发布