Question is how do i stop this
void name_reverse(char s[]){
int len = 0;
while (s[len] != '\0') {
len++;
}
len--;
while (len >= 0) {
printf("%c", s[len]);
len--;
}
}
Basically, this takes the input string and reverses it and prints it. However, my first loop stops reading the string when there is a space
Example:
Hey
yeH
but
He y
eH
how to fix