This C program reads a sentence until a ‘.’ is encountered and then calculates the number of words in the sentence.
Program: Encounter a full stop and then count the number of words in that sentence
Output: Print the number of words
Enter a sentence: This C program prints the number of words in a sentence. Number of words in the sentence= 11
Share your code and queries in the comments.
If this post helped you, please drop a thank you note in the comments ❤ .
Visit C examples for more C programming examples.
Follow us on twitter.