367,077 views
34 votes
34 votes
write a c program that read a string of characters entered from the keyboard, and then the program will count and list all digits, vowels, and consonants found in the string. to display vowels and consonants, keep case sensitivity the same as what they entered.

User Joe DeRose
by
2.7k points

1 Answer

10 votes
10 votes

Answer:Here, the string entered by the user is stored in the line variable.

Initially, the variables vowel, consonant, digit, and space are initialized to 0.

Then, a for loop is used to iterate over the characters.

Step-by-step explanation:

User Simeonovich
by
2.9k points