mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-16 15:44:39 +00:00
16 lines
227 B
C
16 lines
227 B
C
|
void fun(char *s, char *t) {
|
||
|
int len = strlen(s);
|
||
|
|
||
|
for (int i = len - 1; i >= 0; i--) {
|
||
|
*t = s[i];
|
||
|
t++;
|
||
|
}
|
||
|
|
||
|
for (int i = 0; i < len; i++) {
|
||
|
*t = s[i];
|
||
|
t++;
|
||
|
}
|
||
|
|
||
|
*t = '\0';
|
||
|
}
|