basics · beginner · ~15 min
Loop over a string testing membership.
Implement int count_vowels(const char *s) returning the number of vowels (a,e,i,o,u, lower-case only) in s.
int count_vowels(const char *s) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.