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