44 date:2021.3.21
要点:
可作程序设计题思考
详细代码如下:
#include <stdio.h>
#include <string.h>
void fun (char *s, char *t)
{
/************found************/
int i,sl;
sl = strlen(s);
for (i=0; i<sl; i++)
/************found************/
t[i] = s[sl-i-1];
for (i=0; i<=sl; i++)
t[sl+i] = s[i];
t[2*sl] = '\0';
}
void main()
{
char s[100], t[100];
printf("\nPlease enter string s:"); scanf("%s", s);
fun(s, t);
printf("The result is: %s\n", t);
}