FILE *fPtr = fopen("ConsonantInput.txt", "r");
char sWord[1024];
int nWordCount = 0;
while(!feof(fPtr))
{
memset(sWord, 0x00, sizeof(sWord));
fscanf(fPtr, "%s", sWord);
short nCount = strlen(sWord);
short nConsonantCount = 0;
for(int i = 0; i < nCount; ++i)
{
switch(sWord[1])
{
case 'A':
case 'E':
case 'I':
case 'O':
case 'U':
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
case '-':
{
break;
}
default:
++nConsonantCount;
}
if(nConsonantCount >= MAX_CONSONANT_NUMBER)
{
++nWordCount;
break;
}
}
}
printf("Number of Words : %d, Time Taken : %.2f", nWordCount);
fclose(fPtr);
in linux wc -l filename will count the lines and wc will count the letters
consonants with BB
Words that have consonants in them are most commonly the words that do not have all vowels. Some examples of such words are "cat," "dog," "book," and "can."
In the word DAUGHTER, there are 3 vowels namely, A, U, and E, and 5 consonants namely, D, G, H, T, and R. Number of ways of selecting 2 vowels out of 3 vowels = Number of ways of selecting 3 consonants out of 5 consonants = Therefore, number of combinations of 2 vowels and 3 consonants = 3 × 10 = 30 Each of these 30 combinations of 2 vowels and 3 consonants can be arranged among themselves in 5! ways. Hence, required number of different words = 30 × 5! = 3600
Some words with double consonants are rattle, tattle, cattle, battle, mitten, kitten (the tt in the middle of the word is an example of double consonants)Other words with double consonants are rubble, dabble, ribbed, dabbing (the bb in the middle of the word is an example of double consonants.
Please refer to the related questions for some words start and end with consonants.
There are no three letter words that contain only consonants. They need vowels.Y is used as a vowel but not a real vowel; you may try: cry, dry, fry, ply, fly, shy, why, or sly.
The word unload is a verb. Words are not consonants or vowels, words have consonants and vowels. unload has 3 vowels (u,o,a) and 3 consonants (n,l,d)
The number 7/seven, it has two vowels and three consonants....... thats the answer I see best for your question........
Word Count
You have written 6 of them in your question - what, words, consonants, next, each, other I hope this helps
alot