Thats because the comma, fullstop, semicolon, etc. are directly connected to the article. In normal phases the " " will seperate them. So just have to delete the symbols 😊
Or replace all your if statements like this:
strstr(b, "the") != NULL
Your code barely works for the given string and would need to be completely rewritten for a different string. That's a bad software design, a brute force technique. That's OK your learning and you have tried something but it didn't work.
Take a look at the strtok() function in the standard libraries. It is specifically designed to tokenise strings separated by specific delimiters...