Write a C program to count total number of words in a string using loop. How to find total number of words in a given string using loops in C programming. Logic to count total number of words in a string.
Example
Input
Input string: I love Codeforwin.
Output
Total number of words: 4