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
8.7 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 6, 2025

-> The UGC NET Exam Schedule 2025 for June has been released on its official website.

-> The UGC NET Application Correction Window 2025 is available from 14th May to 15th May 2025.

-> The UGC NET 2025 online application form submission closed on 12th May 2025.

-> The June 2025 Exam will be conducted from 21st June to 30th 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 master new version teen patti rummy 51 bonus teen patti sweet teen patti joy teen patti all games