actually i wanted to count the number of words which start with character 's' in the following statemens.
It is new.It is singular.
It is simple.It must succeed!
the below code counts the no. of 's' but not the words starting with 's'.
You can't with you current logic; as I just said, you need more logic!
Think about what results you get from isalpha() as you scan the string and hopefully you can come up with a strategy yourself (how do you spot the start of words when you read text?)