判断下标为奇数则复制
#include <stdio.h> void fun(char str1[],char str2[]) { int i; for(i=0;i<strlen(str1);i++) if(i%2==0) str2[i/2] = str1[i]; }