1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-16 15:44:39 +00:00

fix: 【实践课内】13.指针1/6-4 移动字母.c

This commit is contained in:
Baoshuo Ren 2024-11-29 16:12:03 +08:00
parent 3dec252d7e
commit d33e765484
Failed to extract signature

View File

@ -1,5 +1,6 @@
void Shift(char s[]) {
int s_len = strlen(s);
memcpy(s + s_len, s, 3);
memcpy(s + 3, s, s_len);
memcpy(s, s + 3, s_len);
s[s_len] = '\0';
}