void fun(char *s,char t[])
{
int i=0,j=0;
while(*(s+i)!='\0')
{
if(i%2==1&&*(s+i)%2==1)
t[j++]=*(s+i);
i++;
}
t[j]='\0';
}
void main()
{
char *str="ABCDEFG12345";
char newstr[20];
printf("%s\n",str);
fun(str,newstr);
printf("%s\n",newstr);
}
木有测试,不知有没有错误呢