I'm suppose to write a program that takes a c-string as input and then it must check if the c-string consist of a single blank space between the words, if not the program must fix that by putting a single blank space between the words. I've tried writting the program but i cannot finish it as i am clueless when it comes to testing the input c-string for a single blank space between words. please help!
Look at each letter in turn.
If letter is a blank space, check that following letter is NOT a blank space.
If following letter IS a blank space, you have two (or more) blank spaces between words.