3. The proposal! by CodeChum Admin Thanks to your help again, I found the perfect ring for her. I'm going to propose tomorrow but I'm nervous. I think when I'm going to ask her the famous question,...





3. The proposal!


by CodeChum Admin






Thanks to your help again, I found the perfect ring for her. I'm going to propose tomorrow but I'm nervous. I think when I'm going to ask her the famous question, "Will you marry me?", she's going to respond with:



"Only if you can determine if there is a vowel in a certain word"



Shucks! It's always better to be prepared. Who knows that might indeed happen. I'm going to need your help to create function that'll do this so tomorrow, I will just call this function.





Instructions:



  1. In the code editor, you are provided a main() function that asks the user for a word. This word is then passed to a function called, hasVowel().


  2. Your task is to define the hasVowel() function which has the following details


    1. Return type - int

    2. Name - hasVowel


    3. Parameter:


      1. char* - to hold the character array



    4. Return value - 1 if there is at least 1 vowel and 0 if there is none. Be sure to consider both the capital and small letter vowels when checking.








Input




1. The word







Output





Enter·the·word:·CodeChum

There·is·a·vowel·in·the·word·"CodeChum"



letter vowels when<br>main.c<br>+<br>Test Cases<br>checking.<br>1 #include<stdio.h><br>2<br>ÇE Run Tests<br>3 - int main(void) {<br>char word[100];<br>Input<br>4<br>5<br>1. The word<br>printf(
> > "/>
Extracted text: letter vowels when main.c + Test Cases checking. 1 #include 2 ÇE Run Tests 3 - int main(void) { char word[100]; Input 4 5 1. The word printf("Enter the word: "); scanf("%s", word); Test Case 8 1 Output 9. int result = hasVowel(word); 10 if(result printf("There is a vowel in the word \"%s\"" } else if(result printf("There is no vowel in the word \"%s\"", word); } 11 - 1) { == Enter the word: CodeChum 12 word); Test Case There is a vowel in the word "CodeChun 13 0) { == 2 14 15 16 17 return 0; Test Case 18 } 3 Score: 0/10 > > >
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here