Here is the code http://pastebin.com/Abk8GY3m. When the program prompts me for the name. It gives me the correct output. For example Robert Vicino gives the output RV. I compared it with the cs50 staff's own implementation of initials and it gives the same result. When checking for alternatives like Joseph Gordon-Levitt, Conan O’Brien as input, both programs output the same result.
But, when I type AA AA AA the output is AAAAAAAA instead of AAA. Can someone give me a hint why it does that? As I went through the code understanding deepen a bit is there something wrong with ? printf("%c", toupper (s[i+1]));
Also searched through a couple of posts here. Till now nothing helped.
When I type in vvvv then it also prints out vvvv.Which should not happen, the instructions state, that it should print out only the first character, of each word.
Why does this happen ? Can someone help me identifying the mistakes in the code or in my understanding of the code.