Count vowels and consonants in c

Count nos. of  vowels,consonants and special characters in String using character array each and every character compare with a,e,i,o,u vowels

Different type of definition code

c program code count nos of vowel ,consonants in a string

write c program  given any string and count nos of vowel

write source code How many vowel and consonants in a  characters in a  string

Source Code


Output Convert String in UPPERCASE

Enter any string : Hello World!

No of characters(length) in String is :12
No of Vowels in String is : 3
No of Consonants in String is : 8
No of  Special char. in String is : 1


Program code Explain :

In this program first step small case alphabet char  convert into upper alphabet using inbuilt function toupper in ctype.h a header file then second step each character compare with A,E,I,O,U if it is true count in vowel otherwise it false count in consonants
if  given character is   ‘\t’ – tab key‘ ‘ –  blank space   or  ‘\0’ new line enter key  it count in a special character






(Visited 53 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

Reload Image