expertise on c language

The task is to create a program that receives 10 words from user and prints the longest word and number of vowels int it.
I have managed to to find the longest word but I can't find its number of vowels.
 
Last edited:
Could someone help me with the vowels bit. I just want to find the number of vowels in the longest word out of the 10. I am stuck at this.
 

Karim

I could agree with you but then we’d both be wrong
HALYEEY
VIP
Do you want us to post C Program to Check whether a Character is Vowel or Consonant OR you want us to help you with finding the word with the most vowels?!!
 
Do you want us to post C Program to Check whether a Character is Vowel or Consonant OR you want us to help you with finding the word with the most vowels?!!
So far I maged to find the longest word out of the ten inputs from the user but I can't print the number of vowels in this word specifically. If that makes sense.
 

Phiirso

Getting draids inshallah
idk if you managed to solve this but like @where! said, post your code I'd like to learn.

I don't know C but if js and the words are in an array, 1) put vowels in dictionary, and set counter variable, 2) loop through array, 3) find longest in your data set and save on a variable or array, 4) loop through the var or array and just check if each individual letter is in the dictionary, if yes, add to counter, 5) return counter and you should be set.
 
idk if you managed to solve this but like @where! said, post your code I'd like to learn.

I don't know C but if js and the words are in an array, 1) put vowels in dictionary, and set counter variable, 2) loop through array, 3) find longest in your data set and save on a variable or array, 4) loop through the var or array and just check if each individual letter is in the dictionary, if yes, add to counter, 5) return counter and you should be set.
It is ok i managed to solve it.
 
last time i did c was in university, but if I remember correctly you'll need to use scanf for taking user input, store it in some array, loop through the array with a for loop and create an if statement to check element in the array for what u want and throw in a counter in there somewhere
 
last time i did c was in university, but if I remember correctly you'll need to use scanf for taking user input, store it in some array, loop through the array with a for loop and create an if statement to check element in the array for what u want and throw in a counter in there somewhere
Do you have to use 2d array or there is other options.
 
Top