ProgrammingHard

A quadratic probing table of size 8 starts at h = 2 and uses probe i checks (h + i*i) % 8 for i = 0, 1, 2, 3. What index is checked at i = 2?

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

Correct answer: D. 6

The sequence is 2, 3, 6, 3, so the third probe, at i = 2, checks slot 6. Quadratic probing from h = 2 repeats slot 3 by i = 3.

More C Programming questions

Exams that ask this topic