Example 76: Count Vowels, Consonants, and Words
Understand how to create a C function that counts vowels, consonants, and words within a sentence. Explore the use of character checking functions such as isalpha and isspace to handle alphabetic and space characters accurately, ensuring reliable string processing in your programs.
We'll cover the following...
We'll cover the following...
Problem
Write a function that counts vowels, consonants, and words present in a sentence received as an input parameter.
Example
| Input | Output (V, C, W) |
|---|---|
| str = “Able was I ere I saw elba” | 10, 9,7 |