c语言 11-8
1、
#include <stdio.h> void del(char *s1) { char *tmp = s1; while(*tmp) { if(*tmp < '0' || *tmp > '9') *s1++ = *tmp++; else tmp++; } *s1 = '\0'; } int main(void) { char str1[128]; printf("str1: "); scanf("%s", str1); del(str1); printf("result after deleting num: %s\n", str1); return 0; }