As the title says, that's the program.
Everything works fine until I enter more than one blank space.
E.g. they are tall - works fine ; they are tall - returns TheY ArE
Why does this happen?
You are subtracting 32 from all characters that are next to a space. Space has ASCII value 32, so when a space is next to another space it ends up as 0. A character with value 0 is a null character ('\0') and is used to mark the end of strings. This means that when you later try to print the string it stops where the two consecutive spaces were, thinking it's the end of the string.