ProgrammingHard

int c = 0; const char *s = "Queue"; for (int i = 0; s[i]; i++) if (strchr("aeiou", tolower((unsigned char)s[i]))) c++; printf("%d", c); What is printed?

  1. A. 3
  2. B. 5
  3. C. 4
  4. D. 2

Correct answer: C. 4

The vowels in Queue are u, e, u and e, so the count is four.

More C Programming questions

Exams that ask this topic