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:
parent
3dec252d7e
commit
d33e765484
@ -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';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user