#include<stdio.h>
int countvowels(char str[]);
int main() {
char str[]="hello world";
printf("vowels are : %d",countvowels(str));
}
int countvowels(char str[]){
int count=0;
for(int i=0;str[i]!='\0';i++){
if(str[i]=='a'|| str[i]=='e' || str[i]=='i' || str[i]=='o' || str[i]=='u'){
count++;
}
}
return count;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: