How can we count the number of word in sentence without using <string.h> library ?
Example :
My name is SeA!
The sentence got 4 words there, how can we count it ?
This is a discussion on How to count the words in sentence ? within the C Programming forums, part of the General Programming Boards category; How can we count the number of word in sentence without using <string.h> library ? Example : My name is ...
How can we count the number of word in sentence without using <string.h> library ?
Example :
My name is SeA!
The sentence got 4 words there, how can we count it ?
Look at each character
If a nonspace follows a space, increment the word counter.
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers