#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<Windows.h> #include<stdio.h> void main() { char A[10] = "abcdefgihd"; int B[10],j=0; for (int i = 0; i < 10; i++)//下标双号字符传递 { if (i%2==0) B[j++] = A[i]; } for (int i = j-1; i >=0; i--)//逆序打印结果 { printf("%c", B[i]); } system("pause"); }