好几处写错了,我都改了,你参考一下:
# include
int main (void)
{
char *fun (char *p) ;
char *z ;
char c[100]="asddgxQEZVBNR";
z=fun (c);
printf ("%s\n",z);
}
char *fun (char *p)
{
char *q=p ;
int i ;
for (i=0;*q!='\0';i++,q++)
{
if(i%2!=0&&*q>='a'&&*q<='z')
*q=*q-32 ;
}
return (p);
}