提交时间:2025-07-11 13:01:10
运行 ID: 330948
#include <stdio.h> #include <string.h> #define MAX_LENGTH 100 int main() { char a[MAX_LENGTH], b[MAX_LENGTH], c[MAX_LENGTH]; scanf("%s %s %s", a, b, c); char temp[MAX_LENGTH]; // A和B交换 strcpy(temp, a); strcpy(a, b); strcpy(b, temp); // A和C交换 strcpy(temp, a); strcpy(a, c); strcpy(c, temp); printf("%s %s %s\n", a, b, c); return 0; }