C语言指针遍历
发布网友
发布时间:2022-09-07 10:32
我来回答
共2个回答
热心网友
时间:2024-10-11 00:04
#include<stdio.h>
char * keepAlpChar(char *fromString,char *charList )
{
charList = fromSting
int i = 0;
while(*fromString)
{
if(*fromString>'9' || *fromString<'0')
fromString[i++] = *fromString;
fromString++;
}
fromString[i] = '\0';
return charList;
}
void main(){
char str[]=" a12b332c443汉3232字";
char str1[]="abc汉字";
char * keepber= keepAlpChar(str,str1);printf("==%s\n",keepber);
}
热心网友
时间:2024-10-11 00:00
网上有的,找一下