H
howa
void reverse_string(char *str) {
if (str == NULL)
return;
char tmp;
size_t len = strlen(str);
size_t mid = (int) len / 2;
for (size_t i = 0; i < mid; i++) {
tmp = str;
str = str[len-i-1];
str[len-i-1] = tmp;
}
}
str can be reversed....
if (str == NULL)
return;
char tmp;
size_t len = strlen(str);
size_t mid = (int) len / 2;
for (size_t i = 0; i < mid; i++) {
tmp = str;
str = str[len-i-1];
str[len-i-1] = tmp;
}
}
str can be reversed....