ProgrammingVery hard

What is the number of subsets of {0, 1, 2, 3, 4} whose element sum is even (the empty set counts)?

  1. A. 15
  2. B. 16
  3. C. 17
  4. D. 32

Correct answer: B. 16

Exactly half of the 32 subsets have an even sum, because toggling the element 0 changes the parity.

More C Programming questions

Exams that ask this topic