{
if (str[i] == 'a' || str[i]=='A') ac++;
else if (str[i] == 'e' str[i]=='E') ec++;
else if (str[i] == 'i' str[i]=='I') ic++;
else if (str[i] == 'o' str[i]=='O') oc++;
else if (str[i] == 'u' str[i]=='U') uc++;
}
vc = ac+ec+ic+oc+uc;
printf("TOTAL NO OF VOWELS ARE : %d\n", vc);
printf("COUNT OF A = %d\n", ac);
printf("COUNT OF E = %d\n", ec);
printf("COUNT OF I = %d\n", ic);
printf("COUNT OF O = %d\n", oc);
printf("COUNT OF U = %d\n\n", uc);
for(i=0;i
{
if(str[i]==' ')
{
word++;
}
}
printf("THE NO OF WORDS IN STRING ARE %d",word);
getch();
}
OUTPUT :
ENTER THE STRING: KAMLESH MENGAR
TOTAL NO OF VOWELS ARE : 4
COUNT OF A : 2
COUNT OF E : 2
COUNT OF I : 0
COUNT OF O : 0
COUNT OF U : 0
THE NO OF WORDS IN STRING ARE : 2