CUET Exam  >  CUET Tests  >  CUET Mock Test Series  >  Computer Science: CUET Mock Test - 8 - CUET MCQ

Computer Science: CUET Mock Test - 8 - CUET MCQ


Test Description

40 Questions MCQ Test CUET Mock Test Series - Computer Science: CUET Mock Test - 8

Computer Science: CUET Mock Test - 8 for CUET 2024 is part of CUET Mock Test Series preparation. The Computer Science: CUET Mock Test - 8 questions and answers have been prepared according to the CUET exam syllabus.The Computer Science: CUET Mock Test - 8 MCQs are made for CUET 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Computer Science: CUET Mock Test - 8 below.
Solutions of Computer Science: CUET Mock Test - 8 questions in English are available as part of our CUET Mock Test Series for CUET & Computer Science: CUET Mock Test - 8 solutions in Hindi for CUET Mock Test Series course. Download more important topics, notes, lectures and mock test series for CUET Exam by signing up for free. Attempt Computer Science: CUET Mock Test - 8 | 40 questions in 45 minutes | Mock test for CUET preparation | Free important questions MCQ to study CUET Mock Test Series for CUET Exam | Download free PDF with solutions
1 Crore+ students have signed up on EduRev. Have you? Download the App
Computer Science: CUET Mock Test - 8 - Question 1

Match the following:

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 1

The correct matching pairs are

Computer Science: CUET Mock Test - 8 - Question 2

Two statements are given below:

Statement I: Stack follow Last In First Out (LIFO)
Statement II: Delete is possible from Bottom as well as Top.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 2

Statement I is correct because it follows the LIFO(Last in First Out). It means you can delete that element which comes first. Statement II is incorrect because elements can be deleted only from the top in Stack data structure.

Computer Science: CUET Mock Test - 8 - Question 3

Which of the following is not a keyword in SQL?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 3

ADD is not a keyword in SQL.

Computer Science: CUET Mock Test - 8 - Question 4

Which of the following operations in relation algebra requires two relations having the same number of attributes?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 4

The union operator requires that both relations are union-compatible. This means that they are required to have the same set of attributes.

Computer Science: CUET Mock Test - 8 - Question 5

Where is metadata stored in MySQL?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 5

Metadata is the data about the data. Anything that describes the database—as opposed to being the contents of the database—is metadata. Metadata stored in the MySQL in the MySQL database mysql

Computer Science: CUET Mock Test - 8 - Question 6

Which of the following functions is not performed by DDL?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 6

A DDL performs the following functions :

  1. It identifies the type of data division such as data item, segment, record and database file.
  2. It gives a unique name to each data item type, record type, file type and data base.
  3. It specifies the proper data type.
  4. It defines the size of the data item.
  5. It may define the range of values that a data item may use.
  6. It may specify privacy locks for preventing unauthorized data entry.
Computer Science: CUET Mock Test - 8 - Question 7

Two statements are given below:

Statement I: Prefix notation for the (a+b)*(c-d) is +*ab-cd.
Statement II: Postfix notation for the (a+b)*(c-d) is ab+cd-*.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 7

Correct Prefix notation for the (a+b)*(c-d) is *+ab-cd(a+b)*(c+d) = (+ab)*(-cd) = *+ab-cd (Statement I is Incorrect). Postfix notation for the (a+b)*(c-d) is *+ab-cd(a+b)*(c-d) = (ab+)*(cd-) = ab+cd -* (Statement II is Correct).

Computer Science: CUET Mock Test - 8 - Question 8

The 'is empty ( )' function can be also be written by using

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 8

The 'is empty ( )' function can be also be written by using '? :'.

Computer Science: CUET Mock Test - 8 - Question 9

Where are stack and stack pointers located?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 9

A stack pointer is a small register that stores the address of the last program request in a stack. A stack is a specialized buffer which stores data from the top down. Both stack and stack pointers reside in the memory.

Computer Science: CUET Mock Test - 8 - Question 10

A cookie stores ______.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 10

A cookie stores information about the user's web activity.
They are small files often including unique identifiers that web servers send to browsers. They can be sent back to the server each time your browser requests a new page. It helps browsers remember your preferences and habits online.

Computer Science: CUET Mock Test - 8 - Question 11

Hashing procedures are used in __________.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 11

With random hashing, the probe sequence is generated by the output of a pseudorandom number generator seeded by the key (possibly together with another seed component that is the same for every key, but is different for different tables)

Computer Science: CUET Mock Test - 8 - Question 12

Directions: Match the contents under List I with those under List II.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 12

These are the built-in exceptions in Python:

  • 'ValueError' is raised when an invalid argument is passed to a function.
  • 'TypeError' is raised when an operation or function is applied to an object of inappropriate type.
  • 'IndexError' is raised when an index is out of range.
  • 'KeyError' is raised when a dictionary key is not found.
Computer Science: CUET Mock Test - 8 - Question 13

Which of the following term includes the mean of the processed data during business operations?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 13

Information includes the processed data by planning, controlling and analysing.

Computer Science: CUET Mock Test - 8 - Question 14

Which rule of a communication protocol prevents a fast sender from flooding a slow receiver with data, by regulating the flow of data on communication lines?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 14

This communication protocol prevents a fast sender from flooding a slow receiver with data, by regulating the flow of data on communication lines.

Computer Science: CUET Mock Test - 8 - Question 15

The relational model uses some unfamiliar terminology. A tuple is equivalent to _________.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 15

You can treat a tuple as a kind of record, where the index of an element in a tuple is its name within the equivalent record, so (10, 25) is {0 : 10, 1 : 25}. I believe 'Standard ML' and related languages use records as the basic unit of type conjunction (algebraic data types provide type dis-junction) and treat tuples as a kind of record in this way.

Computer Science: CUET Mock Test - 8 - Question 16

A database management system (DBMS) is a ________.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 16

Database Management Systems (DBMS) are software systems used to store, retrieve, and run queries on data. A DBMS serves as an interface between an end-user and a database, allowing users to create, read, update, and delete data in the database.

Computer Science: CUET Mock Test - 8 - Question 17

SQL commands which come under 'Data Definition Language' are ___________.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 17

Data Definition Language(DDL) is a subset of SQL and a part of DBMS(Database Management System). DDL consist of Commands to commands like CREATE, ALTER, TRUNCATE and DROP. These commands are used to create or modify the tables in SQL.

Computer Science: CUET Mock Test - 8 - Question 18

Based on transmission technology, computer networks can be classified into _____ type(s) of networks.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 18

Transmission media is basically divided into two categories:

  • Broadcast Networks
  • Point-to-Point Networks
Computer Science: CUET Mock Test - 8 - Question 19

In context of computer software, what does spyware mean?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 19

Spyware, in context of computer software, is software that aims to gather information about a person without his/her knowledge, and that may send such information to another entity.
Spyware is mostly used for stealing information, storing internet users' movements on the web, and serving up pop-up ads to the internet users. Whenever a spyware is used for malicious purposes, its presence is typically hidden from the user and can be difficult to detect. Some spyware, such as keyloggers, may be installed by the owner of a shared, corporate, or public computer intentionally in order to monitor users.

Computer Science: CUET Mock Test - 8 - Question 20

_______ defines the rules and regulations that are to be followed during data communication.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 20

Protocol is a set of rules and regulations. It defines the rules and regulations for communication over the network.

Computer Science: CUET Mock Test - 8 - Question 21

The domain name is also know as _________ name.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 21

Concept:
Each computer server hosting a website or web resource is given a name against its IP address. These names are called domain names or hostnames.

  • The Internet is a vast ocean where information is available in the form of millions of websites. Each website is stored on a server that is connected to the internet, which means each server has an IP address.
  • Every device connected to the internet has an IP address. To access a website, we need to enter its IP address on our web browser.
  • But it is very difficult to remember the IP addresses of different websites as they are in terms of numbers or strings.
  • Conversion of the domain name of each web server to its corresponding IP address is called domain name resolution.
Computer Science: CUET Mock Test - 8 - Question 22

Standard Ethernet cards can support data transfer between _____________________.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 22

Concept:
10 Mbps to 1 Gbps of data transport are supported by Ethernet cards (1000 Mbps). A MAC address, which is present on every NIC, aids in uniquely identifying each computer on the network.

  • A network adapter used to set up a wired network is an Ethernet card, sometimes referred to as a Network interface card. It serves as the network's and computer's interface.
  • A computer's motherboard has a circuit board attached to it. The computer's NIC links it to the network through the ethernet wire.
  • An ethernet connection is the most often used network connection for personal computers. Actually, Ethernet is a communication protocol and hardware description standard for computer network architectures.
  • With its wide applications, there are various types of network interface cards emerging in the market like PCIe cards and server network cards.
  • A network interface card connects the clients, servers, and peripherals to the network through a port.
  • NIC allows a computer to connect to a computer network through Ethernet or WiFi. Ethernet: wired connection. WiFi: wireless connection.
Computer Science: CUET Mock Test - 8 - Question 23

Consider the following real-life applications and identify the concept upon which they are based.

X: 10 plates were placed over another and made a tower.
Y: 10 customers waiting for their turn on the interactive voice response system.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 23

Stack works in a LIFO manner. That is last in first out, the element which inserted last should come out first.
X statement considers the same real-life application as a stack.10 plates were placed over another and made a tower. This is the same as a stack structure. when we remove a plate from the top, the last inserted plate will come out. So, it's an application of stack.
Queue works on FIFO pattern ( first in first out), The element inserted first should come out first. 
Statement Y is an example of a queue, because 10 customers waiting for their turn in an interactive voice response system, in that the customer who connected to the line first will be served first. That's a FIFO property, So, Statement Y is an example of the queue.
A similar example of Stack-

  • Tower of Hanoi, Disc kept in a cylindrical box 
  • Queue- people waiting to book a ticket.
Computer Science: CUET Mock Test - 8 - Question 24

What is the output for the given python code?

fp = open("sample2.txt", "w")
print(fp.tell())
fp.write('12345678')
print(fp.tell())
fp.close()

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 24

The correct answer is option A.

Concept:
The given python code is,
tell() method:
This function returns an integer that specifies the current position of the file object in the file. The position so specified is the byte position from the beginning of the file till the current position of the file object.
The syntax of using tell() is:
file_object.tell()
The given code is,
fp = open("sample2.txt", "w")
print(fp.tell())
fp.write('12345678')
print(fp.tell())
fp.close()

Explanation:
The given sample2.txt opens the file in write mode. If the file already exists, all the contents will be overwritten. If the file doesn’t exist, then a new file will be created.
Here is the file newly created and write the contents. And we will notice the position of the handle before writing and after writing to the Sample2.txt file.
the position of the handle before writing=0
after writing to the Sample2.txt file = 8
Hence the correct answer is 
0
8

Computer Science: CUET Mock Test - 8 - Question 25

Each NIC has a ___________ address, which helps in uniquely identifying the computer.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 25

Concept:

A network interface controller (NIC) is given a media access control address (MAC address), which it can use as a network address in communications inside a network segment.

  • To send Ethernet frames to a computer, utilize the MAC address. The operating system and the NIC exchange data through the NIC driver software.
  • Although each MAC address is exclusive to the network card that is placed on a device, because there are only so many device-identifying bits available, manufacturers occasionally reuse them.
  • NIC, or network interface card, is a shortened form. Network adapter and Ethernet card are other names for NIC. The device that enables a computer to connect to a network, such as a home network, is an expansion card or hardware interface.
Computer Science: CUET Mock Test - 8 - Question 26

Assertion A: Dequeue can support both stack and queue.
Reason R: Dequeue supports insertion and deletion at both ends.
In the light of the above statements, choose the most appropriate answer from the options given below:

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 26

The de queue is a combination of both queue and stack,  where we can push and pop from both left and right sides. So, it can be used as both stack and queue, 
In stack, we use to insert in the front, and in the queue, we used to insert from the back. So, both work we can do on de queue, That's why it's called as Double Ended queue.
dequeue allows you to efficiently add or remove the item from Either end of the list. 
So, the Assertion statement is correct. 
Now, the reason is also true and correctly explains the assertion. In the de queue, we can insert and delete from both the ends that's why it can support both stack and queue.
de queue is implemented as a double-linked list in the system and we can insert and delete from both ends.

So, option C turns out to be the correct answer as Reason correctly explains the Assertion.  

Computer Science: CUET Mock Test - 8 - Question 27

This process of creating an exception object and handing it over to the runtime system is called__________?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 27

The correct answer is option A.

Concept:
When an error occurs, the Python interpreter creates an object called the exception object. This object contains information about the error like its type, file name, and position in the program where the error has occurred.
The object is handed over to the runtime system so that it can find an appropriate code to handle this particular exception. This process of creating an exception object and handing it over to the runtime system is called throwing an exception. 


Hence the correct answer is throwing an exception.

Computer Science: CUET Mock Test - 8 - Question 28

Mark is interviewing for the role of a database developer. To help with the revisions, he made himself a quiz. Help him answer the questions.
The default format for the DATE datatype in MySQL is:

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 28
  • The DATE data type is used for storing a date in database tables. The supported dates range from 1000-01-01 to 9999-12-31.
  • The default format of this data type is the 4-digit year, followed by 2-digit month and 2-digit day. The 3 values are separated by hyphens (-).
Computer Science: CUET Mock Test - 8 - Question 29

The below statement is executed on the Python shell and raised an error. Identify the type of error from the given options:

print(525 + '525')

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 29

Type Error usually comes when a user tries to do an operation between different types of data types. 

Here in print(525+'525')- 
525 is an integer data type, and '525' is a string data type, So, Python does not support the use of + operator between two different data types. So, it will throw a Type Error. 

CORRECTION OF THE CODE - 
This code can be corrected by- print(525+525) - using both integer data type , Output- 1050
OR 
print('525'+'525') - using both string data type , Output- '525525' ( This is called as string concatenation ) 

So, option c will be the answer. 

Computer Science: CUET Mock Test - 8 - Question 30

Which statement, if any, will return an error in the following code snippet?

import pickle #statement 1
f=open("data.dat",'rb')  #statement 2
d=pickles.load(f) #statement 3
f.close() #statement 4

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 30
  • The first statement imports the Pickle package of Python. This package is used to save an object structure along with the current data. This package is useful for retrieving a previous data state at any time. The statement does not contain any error.
  • The second statement opens a binary file, data.dat in the “read in binary” mode using the open() function. The file handle is stored in the variable f. The open() function takes the file name and the mode of operation as parameters. Thus, this statement is correct.
  • The load() function of the Pickle module is used to unpickling data from a binary file. The returned data then needs to be stored in a variable. In statement 3, the load() function is invoked using ‘pickles’, but the module which contains this function is called pickle. So, this statement is incorrect.
  • A file must be closed after working on it. The close() function is used with the file handler variable for this.
Computer Science: CUET Mock Test - 8 - Question 31

A tuple is a _____________ entity whereas attribute values can be _____________ in the table.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 31

Concept:
A tuple is a unique entity whereas attribute values can be duplicated in the table.

  • Each row of data in a relation (table) is called a tuple. In a table with n columns, a tuple is a relationship between the n-related values.
  • Tables are referred to as relations in a relational model and are used to store data for various columns. Each table may contain a number of columns, each of which should have a distinct name.
  • It is important to note here that relations in a database are not independent tables, but are associated with each other.
  • Each tuple (row) in a relation (table) corresponds to data of a real-world entity (for example, student, guardian, and attendance).
  • Characteristic or parameters for which data are to be stored in a relation. As stated, the columns of a relation are the attributes also referred to as fields.
  • A sequence of tuples in a relation is immaterial. The tuples are not considered to be ordered, even though they appear to be in tabular form.
  • The tuples within a relation must be distinct. It means no two tuples in a table should have the same value for all attributes.
Computer Science: CUET Mock Test - 8 - Question 32

What does the readlines() function return?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 32

Explanation:

  • The readlines() function reads the complete file, line by line. The read() function on the other hand, reads a file character by character.
  • The function returns every line of the file as a list of strings.
  • Each string also includes the new line character \n that follows it.
Computer Science: CUET Mock Test - 8 - Question 33

Which of the following statements are true?

Statement 1: When an error is encountered in a program, the Python interpreter can not raise or throws an exception.
Statement 2: An exception is a Python object that represents an error.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 33

Concept:
Statement 1: When an error is encountered in a program, the Python interpreter can not raise or throws an exception.

False, When an error is encountered in a program, the Python interpreter raises or throws an exception. When these exceptions occur, the Python interpreter stops the current process and passes it to the calling process until it is handled. If not handled, the program will crash.

Statement 2: An exception is a Python object that represents an error.
True, An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions. In general, when a Python script encounters a situation that it cannot cope with, it raises an exception. An exception is a Python object that represents an error.

Hence the correct answer is Only statement B.

Computer Science: CUET Mock Test - 8 - Question 34

The given statements are:
Statement 1: Deque is a version of stack, which allows insertion and deletion at both ends.
Statement 2: Queue is an ordered linear data structure, following FIFO strategy.
Statement 3: In Python, the use of predefined methods takes care of Front and Rear.
Which of the following statements is/are false.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 34

Stack is a data structure that follows the LIFO (last in first out ) pattern, and queue follows FIFO (first in first out) pattern. 
Let's analyze the statements one by one - 

Statement 1 - Dequeue is referred to as a double-ended queue, which is an advanced version of the queue, Not a stack( as per the ques ), Dequeue allows insertion and deletion at both end. but that's the property of queue, not stack. In stock, we have access to the top of the element only. We can insert and delete from one end only in the stack. So, This statement is false. 

Statement 2 - Queue is an ordered linear data structure because it follows a particular order in insertion and deletion. And it follows FIFO ( first in first out) strategy, which means the element inserted first should come out first. So, this statement is TRUE. 

Statement 3 - In python, we do not care about creating the front and rear pointer. Python is a dynamic language, so, it does not ask to create a list for the queue. We can use the INSERTREAR, INSERTFRONT function to implement front and rear in python. So, this statement is true. 

Only Statement 1 turns out to be false here, So, option C will be the answer. 

Computer Science: CUET Mock Test - 8 - Question 35

The given statements are:

Statement A: Binary search takes a sorted/ordered list and divides it in the middle.
Statement B: If the middle element is greater than the key, the search repeats only in the second half of the list.
Statement C: Hash-based searching calculates the position of the key in the list using a formula called the hash function and the key itself.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 35

Let's analyze the statement in detail - 
Statement A- Binary search is a searching algorithm that can only be performed in a sorted array/list, It will take the mid value by using the formula - n/2, where n is the number of elements in the list. So, that's called Dividing the list into two equal parts. So, this Statement is true. 
Statement B - In the 2nd step of Binary search, the key ( element to be searched ) will be compared with the mid-value, and if the middle element is greater then the element should be present on the left side of the list (First half ) because it's a sorted list, ( Statement given in the 2nd half of the list ), So, this Statement is wrong. 
Statement C - HASH based searching is a searching mechanism that uses a Hash table to locate an element. This hash table consists of key-value pairs. 
Hashing formula to locate the position of an element = n mod m ( n is the key or element to be searched and m is the size of the hash table ). 
N mod m is commonly called the Hash function to search an element. 
In python, we use the hash() function to return the hash value of an element if it has one. So, this Statement is True. 
So, Statement A and C are true and Statement B is false. 

Option D turns out to be the correct answer here. 

Computer Science: CUET Mock Test - 8 - Question 36

Which function returns the given string after removing leading white space characters?

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 36

The correct option is C
LTRIM(string)
Concept:
LTRIM(string), Returns the given string after removing leading white space characters.
Example: MySQL >SELECT LENGTH (" DELHI" ) LENGTH (LTRIM("DELHI "));
Output: 7    5

Computer Science: CUET Mock Test - 8 - Question 37

What will be calculated for the following SQL function?

MOD(X, Y)

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 37

The correct option is C
Returns the remainder after dividing number X by number Y.

Concept:
MOD(X, Y): Returns the remainder after dividing number x by number y
Example: MySQL > SELECT MOD(21, 2);
OUTPUT: 1

Computer Science: CUET Mock Test - 8 - Question 38

Which of the following is true about the given python code?

fileobject=open("practice.txt","r")
str = fileobject.readline()
while str:
 print(str)
 str=fileobject.readline()
fileobject.close()

Consider practice.txt as a text file

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 38

Concept:

The given python code is,

fileobject=open("practice.txt","r")
str = fileobject.readline()
while str:
 print(str)
 str=fileobject.readline()
fileobject.close()

Explanation:

The readline() is used in the while loop to read the data line by line from the text file. The lines are displayed using the print(). As the end of the file is reached, the readline() will return an empty string. Finally, the file is closed using the close(). 

Hence the correct answer is To display data from a text file.

Computer Science: CUET Mock Test - 8 - Question 39

The given lists are:
List A: [5,12, 2, 34, 40, 32].
List B: [4, 7, 12, 6, 24, 18].
Which of the list required the lowest swaps using bubble sort.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 39

In Bubble Sort, the largest element should move to the extreme right position in every pass. 

So, to count the number of the swap, u need to count the right side smaller element of a particular element, Add all of them to find out the number of swaps. 

Swapping is done in bubble sort when a smaller element is found on the right side. 

For the List A - [5,12,2,34,40,32]  - 
For 5 right side smaller element - 1 (2)
For 12 right side smaller element - 1 (2)
For 2 right side smaller element - 0 
For 34 right side smaller element - 1 (32)   , For 40 right hand side smaller element - 1 (32) 
32 is the last element, so no need to check for that. Total number of swap - 1+1+1+1 = 4 swap required for List A .
 
For List B - [4,7,12,6,24,18]- 
For 4 right side smaller element - 0   For 7 right side smaller element - 1 (6)  
For 12 right side smaller element - 1 (6)     For 6 right side smaller element - 0 
For 24 , right hand side smaller element - 1 (18)  
18 is the last element , so, no need to check for that . 
Total number of swap - 1+1+1 = 3 swaps Required for List B 

So, List B requires the lowest swap using bubble sort. 

option B turns out to be the correct answer. 

Computer Science: CUET Mock Test - 8 - Question 40

In searching, the hash function takes an element from a list and divides it by the size of the hash. This method is known as the  __________  method.

Detailed Solution for Computer Science: CUET Mock Test - 8 - Question 40

Hashing is a searching technique in which we use a hash table and a hash function in the format of h(k) = k mod m, where m is the size or the slot available in the hash table, and k is given the key.

That's the process in which the position of a key is determined in the hash table.

For example - we have a 12-slotted hash table and we want to locate the position of 100 in that table, then 
h(k) = 100 mod 12 = 4 (12*8 will be 96 , and 4 as remainder ) 

A simple rule for calculating mod function - 
1- if we have m mod n and m>n, then the mod will return only the remainder. 
2- and if m=n then it will result in 0. 
3- if m<n then it will return m as the answer. 

8 docs|148 tests
Information about Computer Science: CUET Mock Test - 8 Page
In this test you can find the Exam questions for Computer Science: CUET Mock Test - 8 solved & explained in the simplest way possible. Besides giving Questions and answers for Computer Science: CUET Mock Test - 8, EduRev gives you an ample number of Online tests for practice

Up next

Download as PDF

Up next

Download the FREE EduRev App
Track your progress, build streaks, highlight & save important lessons and more!