Program to Find Vowels in a String 

#include <stdio.h>
#include <string.h>
main()
{
char str[20];
int count=0, i=0;
printf("\nEnter any string: ");
gets(str);
while (str[i] != '\0')
{
if (str[i]=='a' || str[i]=='e' || str[i]=='i' ||
str[i]=='o' || str[i]=='u')
count++;
i++;
}
printf("\nNo. of vowels: %d", count);
getch();