ProgrammingModerate

How many records remain after a struct array of 7 records is filtered to drop those with a key equal to the previous key, when the array is sorted and the keys are 1, 1, 2, 3, 3, 3, 4?

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

Correct answer: A. 4

The distinct keys are 1, 2, 3 and 4, so four records remain.

More C Programming questions

Exams that ask this topic