Which among the following statement(s) is (are) true?

(A) A hash function takes a message of arbitrary length and generates a fixed length code.

(B) A hash function takes a message of fixed length and generates a code of variable length.

(C) A hash function may give same hash value for distinct messages.

Choose the correct answer from the options given below:

This question was previously asked in
UGC NET Computer Science (Paper 2) 2020 Official Paper
View all UGC NET Papers >
  1. (A) only
  2. (B) and (C) only
  3. (A) and (C) only
  4. (B) only

Answer (Detailed Solution Below)

Option 3 : (A) and (C) only
Free
UGC NET Paper 1: Held on 21st August 2024 Shift 1
10.9 K Users
50 Questions 100 Marks 60 Mins

Detailed Solution

Download Solution PDF

The correct answer is option 3.

Key Points

A hash function is defined as any function that can be used to map data of the arbitrary size of data to fixed-size data.

Definition of hash function Statement 1 is correct and Statement 1 is incorrect.

 A hash function may give the same hash value for distinct messages. Yes, it's true. If N%10 is a Hash function. It gives the same values for 101, 11,21,31 as 1.

Hence statement C is correct.
∴ Hence the correct answer is (A) and (C) only.

Latest UGC NET Updates

Last updated on Jun 12, 2025

-> The UGC NET June 2025 exam will be conducted from 25th to 29th June 2025.

-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.

-> The exam is conducted bi-annually - in June and December cycles.

-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions. 

-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.

More Hashing Questions

Get Free Access Now
Hot Links: teen patti club apk teen patti gold real cash teen patti gold downloadable content teen patti wink teen patti royal - 3 patti