...
This solution, however, is in violation of STR04-AC. Use plain char for characters in the basic character set.
Compliant Solution
In this compliant solution, the result of the expression *string++ is cast to (unsigned char) before assignment to the int variable c.
...