← Challenges

C: Count Vowels

Write int solve(char *s) that returns the number of vowels (a, e, i, o, u, case-insensitive) in the C string s.

Examples

  • solve("hello")2
  • solve("sky")0