Write Program C Write Function Counts Number Vowels Null Terminated String Write Helper Fu Q37032985

Write program in C. Write the function thatcounts the number of vowels in a null-terminated string. Write thehelper-function isVowel ( ). Follow the outlinebelow please

#include

#include

int isVowel( int ch )

.

.

.

int countVowels( )

.

.

.

.

.

int main( int argc, char *argv[ ] )

{

int num;

num = countVowels( “apple” );

printf(“There are %d vowels in applen”,num);

}


Solution


#include <stdio.h>int isVowel(int ch) { return ch == ‘a’ || ch == ‘e’ || ch == ‘i’ || ch == ‘o’ || ch == ‘u’ || ch == ‘A’ || ch == ‘E’ || ch == ‘I’ ||

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.