ProgrammingVery hardGATE CS · Campus placements

How many subsets of {1, 2, ..., 10} have an even sum of elements? The empty set counts.

  1. A. 500
  2. B. 512
  3. C. 1024
  4. D. 1000

Correct answer: B. 512

Element 1 is odd, so pairing each subset with the one that toggles 1 swaps even and odd sums. That makes exactly half of the 1024 subsets even, which is 512.

More C Programming questions

Exams that ask this topic