C Exercises: Count the number of vowels and consonants
13. Count Vowels and Consonants Using Pointer
Write a program in C to count the number of vowels and consonants in a string using a pointer.
Visual Presentation:

Sample Solution:
C Code:
Sample Output:
Pointer : Count the number of vowels and consonants : ---------------------------------------------------------- Input a string: string Number of vowels : 1 Number of consonants : 5
Flowchart:

For more Practice: Solve these Related Problems:
- Write a C program to count vowels and consonants in a string using pointer arithmetic without using standard library functions.
- Write a C program to count vowels, consonants, digits, and special characters in a string using pointers.
- Write a C program to determine the frequency of each vowel in a string using a pointer-based approach.
- Write a C program to count vowels and consonants recursively by advancing a pointer through the string.
C Programming Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous: Write a program in C to find the factorial of a given number using pointers.
Next: Write a program in C to sort an array using Pointer.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.