la scanf %s funziona così:
String of characters. This will read subsequent characters until a whitespace is found (whitespace characters are considered to be blank, newline and tab).
per cui si ferma appena trova anche un carattere di spaziatura