ProgrammingModerate

The median of the sorted keys 2, 4, 6, 8 with integer division is which value?

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

Correct answer: C. 5

With an even count the median is the average of the two middle values, (4 + 6) / 2 = 5 with integer division.

More C Programming questions

Exams that ask this topic