/*-------------------------------------------------------【程序填空】---------------------------------------------------------功能:将s所指字符串的正序和反序进行连接,形成一个新串放在t 所指的数组中。例如:当s串为"ABCD"时,则t串的内容应为"ABCDDCBA"。 -------------------------------------------------------*/#include <conio.h>#include <stdio.h>#include <string.h>void fun (char *s, char *t){ int i, d; /***********SPACE***********/ d = strlen(s); /***********SPACE***********/ for (i = 0; i<d; i++) t[i] = s[i]; for (i = 0; i<d; i++) /***********SPACE***********/ t[d+i] = s[d-1-i]; /***********SPACE***********/ t[2*d] ='\0';}main(){ char s[100], t[100]; printf("\nPlease enter string S:"); scanf("%s", s); fun(s, t); printf("\nThe result is: %s\n", t);}