1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-16 15:44:39 +00:00
202401-programming-assignments/【实践课内】13.指针1/6-4 移动字母.c

7 lines
131 B
C

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