engineering computer science MCQ #1250

What is the purpose of a hash function?

engineering computer science MCQ #1250

  1. Question 1

    Q1. What is the purpose of a hash function?

    • A) To compress data
    • B) To encrypt data
    • C) To map data to a fixed-size index
    • D) To sort data

    Answer: To map data to a fixed-size index

    Explanation: A hash function maps input data of any size to a fixed-size index, enabling efficient storage and retrieval of data in a hash table.