logo

AQA A-Level Computer Science practice

A simple hash function is h(key) = key modulo 10. What hash value is produced for the key 47?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Hash tables

Exam-style question

Try this first

A simple hash function is h(key) = key modulo 10. What hash value is produced for the key 47?.

  1. A.0
  2. B.4
  3. C.7
  4. D.10

Answer and explanation

Concise answer

7

Why this is correct

47 modulo 10 is 7, so the hash value is 7.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions