#include <stdio.h>
#include <string.h>
void reverse(char *s) {
size_t i = 0, j = strlen(s);
while (i < j) {
j--;
char tmp = s[i];
s[i] = s[j];
s[j] = tmp;
i++;
}
}
int main(void) {
char s[] = "hello";
reverse(s);
printf("%s\n", s);
return 0;
}two-index swap toward the middle