#include #define LEN 16 int main(void) { char strA[LEN]; /* 文字列を格納する配列 */ char strB[LEN] = "0123456789abcde"; /* 逆順文字列を格納する配列 */ /* 文字列の入力 */ scanf("%s", strA); /* 逆順に格納 ここから */ char *start = strA, *end = strA; while (*end != '\0') end++; end--; char *target = strB; while (end >= start) { *target = *end; target++; end--; } *target = '\0'; /* ここまで */ printf("%s\n", strB); return 0; }