mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
12 lines
203 B
C
12 lines
203 B
C
void reverseString(char *s, int sSize)
|
|
{
|
|
int last = sSize - 1, i;
|
|
for (i = 0; i < last; i++)
|
|
{
|
|
char tmp = s[i];
|
|
s[i] = s[last];
|
|
s[last] = tmp;
|
|
last--;
|
|
}
|
|
}
|