<span style="font-family:Arial;font-size:32px;"><strong>char str[] = "abcd123f";
char *p = str;
int i = 0;
char temp[255] = {0};
while (*(p + i) != '\0') {
if (*(p + i) >= '0' && *(p + i) <= '9') {
strcpy(temp, p + i + 1);
strcpy(p + i, temp);
}else{
i++;
}
}
printf("%s",str);
return 0;
}
</strong></span>
3.有一字符串,包含数字与字母,编程去除数字。要求:1、要求在原字符串中操作2、使用指针处理
最新推荐文章于 2018-09-29 08:38:00 发布