July 04, 2022 |3.4K Views

Program to count vowels, consonant, digits and special characters in string.

  Share   Like
Description
Discussion

Given a string and the task is to count vowels, consonant, digits and special character in string. Special character also contains the white space.
Examples: 
 

Input : str = "geeks for geeks121"
Output : Vowels: 5
        Consonant: 8
        Digit: 3
        Special Character: 2

 

Program to count vowels, consonant, digits and special characters in string: https://www.geeksforgeeks.org/program-count-vowels-consonant-digits-special-characters-string/