Question: 5 ) Write a function to determine is a given word is legal. A word is illegal if it contains no vowels. For this problem,

5) Write a function to determine is a given word is legal. A word is illegal if it contains no vowels. For this
problem, the letter Y is considered to be a legal vowel. Pass in a word to this function and it will determine if
the word is legal or not. You can make the following assumptions about the word you a passing to this function.
1) The string being passed is a combination of letters only (no non-letter check needed)
2) The string being passed is null terminated
3) Letters may be capital or lower case and it has no effect on whether its a word
Examples:
sch - is illegal, no vowels
apple - legal, contains a vowel
APPle - legal, uppercase letter combinations do not matter
try - legal, no vowel, but contains the letter 'y'
int isLegal (char theString[]); /* function prototype to get started, or better yet, use pointers */

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!