ProgrammingVery hard

int count = 0; for (char c = 'a'; c <= 'z'; c++) if (c != 'e' && c != 'i' && c != 'o' && c != 'u') count++; printf("%d", count); What is printed?

  1. A. 26
  2. B. 21
  3. C. 22
  4. D. 18

Correct answer: C. 22

There are 26 letters and four vowels e, i, o and u are skipped. The vowel a is still counted, so the result is 22.

More C Programming questions

Exams that ask this topic