求字符串下标是偶数且ASCII码值也是偶数
程序代码:#include<stdio.h>
void fun(char *s,char t[])
{
int i,j=0;
for(i=0;s[i]!='\0';i++,i++)
if(s[i]%2==0)
t[j++]=s[i];
t[j]='\0';
}
void main()
{
char s[100],t[100];
printf("enter a string S:");
scanf("%s",s);
fun(s,t);
printf("the result is:%s\n",t);
}如题,然后新串放在t数组,请问我调用函数错在哪里了?








