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

Computer Science: CUET Mock Test - 6 - CUET MCQ


Test Description

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

Computer Science: CUET Mock Test - 6 for CUET 2024 is part of CUET Mock Test Series preparation. The Computer Science: CUET Mock Test - 6 questions and answers have been prepared according to the CUET exam syllabus.The Computer Science: CUET Mock Test - 6 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 - 6 below.
Solutions of Computer Science: CUET Mock Test - 6 questions in English are available as part of our CUET Mock Test Series for CUET & Computer Science: CUET Mock Test - 6 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 - 6 | 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 - 6 - Question 1

Two statements are given below:

Statement I: Normalization is the process of organizing data in a database into tables to reduce redundancy.
Statement II: Normalization is the process of organizing data in a database into tables to reduce dependancy.

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

Normalization is a process that is used to eliminate redundant data and to ensure that data is stored in a way that minimizes data dependency. It involves dividing a larger table into smaller tables and defining relationships between them to reduce data redundancy and improve data integrity.

Computer Science: CUET Mock Test - 6 - Question 2

A tuple is a:

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

A single row of a table, which contains a single record for that relation is called a tuple.

Computer Science: CUET Mock Test - 6 - Question 3

A repeater is a device which operates only in the:

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

A repeater is a device that operates only in the physical layer. Signals that carry information within a network can travel a fixed distance before attenuation endangers the integrity of the data.

Computer Science: CUET Mock Test - 6 - Question 4

Which of the following string functions in 'C' converts lowercase input string into uppercase?

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

The strupr( ) function is used to convert a given string to uppercase.

Computer Science: CUET Mock Test - 6 - Question 5

What is the fundamental unit of data transport on computer networks?

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

A network packet is a formatted unit of data carried by a packet-switched network. Computer communications links that do not support packets, such as traditional packet switching, simply transmit data as a bit stream. When data is formatted into packets, the bandwidth of the communication medium can be better shared among users than with circuit switching. A packet consists of control information and user data, which is also known as the payload. Control information provides data for delivering the payload, for example: source and destination network addresses, error detection codes, and sequencing information. Typically, control information is found in packet headers and trailers.

Computer Science: CUET Mock Test - 6 - Question 6

172.16.122.204 IP address belongs to which IP addresses class?

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

Option 1 is the correct answer. The address range of this class is from 128.0.0.0 to 191.255.255.255.

Computer Science: CUET Mock Test - 6 - Question 7

Two statements are given below:

Statement I: Hashing technique is very fast and efficient for large collections, but requires additional memory to store the hash table.
Statement II: Binary search technique is suitable for small collections but can be slow for larger collections.

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

Statement I is correct. Hashing technique is very fast and efficient for large collections, but requires additional memory to store the hash table. Statement II is a fact for Linear Search not for a Binary Search. Binary Search technique reduces the search space by half at each step, making it faster than linear search for larger collections.

Computer Science: CUET Mock Test - 6 - Question 8

The CSV files can be accessed:

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

Opening a CSV file is simpler than you may think. In almost any text editor or spreadsheet program, just choose File > Open and select the CSV file.

Computer Science: CUET Mock Test - 6 - Question 9

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

Detailed Solution for Computer Science: CUET Mock Test - 6 - Question 9
  • Join command combines rows from two or more tables.
  • Group By command groups the result set by specified columns.
  • Order By command sorts the result set based on a specified column.
  • Where clause filters the result set based on specified conditions.
Computer Science: CUET Mock Test - 6 - Question 10

What is sorting?

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

Sorting is the process of arranging data into meaningful order so that you can analyze it more effectively.

Computer Science: CUET Mock Test - 6 - Question 11

Which of the following operators cannot be used with string data type?

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

The ''/'' operator cannot be used with string data type, while the rest three can be used for strings data type.

Computer Science: CUET Mock Test - 6 - Question 12

Two statements are given below, one is Assertion (A) and the other is Reason (R). Read the statements carefully and choose the correct answer.

Assertion (A): Exception handling in Python allows for graceful recovery from errors and prevents program crashes.
Reason (R): When an error occurs during program execution, Python's exception handling mechanism allows the program to gracefully handle the error and take corrective action.

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

Option 1 is the correct answer.
Exception handling in Python allows for graceful recovery from errors and prevents program crashes. When an error occurs during program execution, Python's exception handling mechanism allows the program to gracefully handle the error and take corrective action, rather than crashing the program entirely. This can be achieved by wrapping potentially error-prone code in a try-except block, where the except block catches any exceptions that are raised and takes appropriate action.

Computer Science: CUET Mock Test - 6 - Question 13

Database management systems are intended to:

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

Database management systems are intended to eliminate data redundancy, establish relationships among records in different files and manage file access. Since all of the given options are true, option 4 is the correct answer.

Computer Science: CUET Mock Test - 6 - Question 14

Which statement is true about denial of service (DOS attack)?

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

Dos attack is the type of attack intended to make resources or service unavailable to its intended users. Such DOS attacks are carried out on websites to stop them from functioning.

Computer Science: CUET Mock Test - 6 - Question 15

To prevent infection by a computer virus:

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

The most reliable way to make sure you are safe is to open an email attachment or click on a link is to scan it with anti-virus software.

Computer Science: CUET Mock Test - 6 - Question 16

Consider a tuple tup1 = (10, 15, 25 and 30). Identify the statement that will result in an error.

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

'tup1[2]=20' will make an error.
Here, the first option 'print(tup1[2])' will display the value at the position.
Therefore, print(tup1[2])=25. The starting position is 0.
print(min(tup1)) will display the minimum value in that tuple.
Here, print(min(tup1))=10
print(len(tup1)) will give output as the tuple length.
print(len(tup1)) = 4
But, tup1[2]=20 means assigning a new value to the position.
In tuples, values are constant.
So, tup1[2]=20 will result in an error.

Computer Science: CUET Mock Test - 6 - Question 17

Two statements are given below, one is Assertion (A) and the other is Reason (R). Read the statements carefully and choose the correct answer.

Assertion (A): In a relational database, a primary key is a unique identifier for each record in a table.
Reason (R): A primary key can be a combination of two columns.

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

In a relational database, a primary key is a unique identifier for each record in a table. A primary key cannot be null, and it must have a unique value for each record in the table. The primary key is used to identify each record in the table and to ensure data integrity by preventing duplicate records from being inserted into the table. Therefore, the reason does not correctly explain the assertion.

Computer Science: CUET Mock Test - 6 - Question 18

A text file student.txt is stored in the storage device. Identify the correct option out of the following options to open the file in read mode.
(i) myfile = open('student.txt','rb')
(ii) myfile = open('student.txt','w')
(iii) myfile = open('student.txt','r')
(iv) myfile = open('student.txt')

Detailed Solution for Computer Science: CUET Mock Test - 6 - Question 18
  • There are some codes to handle a file in a programming language.
  • myfile=open('student. txt', 'w') is the mode that allows opening a file in write mode.
  • myfile=open('student.txt', 'r') is the mode that open file in only read mode.
  • myfile= open ('student.txt') is also allowed to open in reading mode.
Computer Science: CUET Mock Test - 6 - Question 19

Which module is to be imported for working in binary file?

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

The pickle module implements binary protocols for serializing and de-serializing a Python object structure.

Computer Science: CUET Mock Test - 6 - Question 20

What will be the output of the following program?
tuple=("Check")*3
print (tuple)

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

Here, Check will be treated as a string, not a tuple, as there is no comma after the element.

Computer Science: CUET Mock Test - 6 - Question 21

Convert the following infix expression to postfix expression using stack:

(A+B*(C-D)^E+(F/G)^H-I)

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

The conversion using stack is as follows:


Computer Science: CUET Mock Test - 6 - Question 22

Match the following:

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

The correct option is B
A → III, B → I, C → IV, D → II

Concept:
Match the following:

A: Modem → III: The device used for conversion between electric signals and digital bits.
B: Ethernet card → I: A network adapter is used to set up a wired network.
C: Repeater → IV: Regenerate the signals.
D: Switch → II: Connect multiple computers.

Computer Science: CUET Mock Test - 6 - Question 23

In python, Which of the following method  is used find weather the queue is empty or not?

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

The correct answer is option C.

Concept:
Queues:

The queue is an abstract data structure, somewhat similar to Stacks.
Unlike stacks, a queue is open at both ends. One end is always used to insert data (en queue) and the other is used to remove data (de queue). Queue follows the First-In-First-Out methodology, i.e., the data item stored first will be accessed first.
Queue follows the principle of First In First Out (FIFO) and Last In Last Out (LILO)
maxsize:
The maximum number of items in the queue. 
put(item): 
Add something to the queue. Wait until a free spot becomes available if the queue is filled before adding the item. 
qsize(): 
Return the number of items in the queue.
full():
If there are maxsize items in the queue, return True. 
get():
A queue item can be removed and returned. Wait until an item is available if the queue is empty.
empty():
Return True if the queue is empty, False otherwise. Here queue is not empty because the still elements are there in the queue. Example:
Explanation:
from queue import Queue
q=Queue(maxsize=10)
q.put('A')
q.put('AA')
q.put('AAA')
print(q.qsize())
print(q.full())
print(q.get())
print(q.empty())
Hence the correct answer is empty().

Computer Science: CUET Mock Test - 6 - Question 24

7 9 3 + 4 / *

The evaluation of the above postfix expression is:

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

The evaluation of the expression is as follows:

Computer Science: CUET Mock Test - 6 - Question 25

Match the following:

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

The correct option is C
1 → IV, 2 → II, 3 → I, 4 → V, 5 → III

  • Bus topology → Each communicating device connects to a transmission medium.
  • Ring topology → Each node is connected to two other devices, one each on either side.
  • Mesh topology → Each communicating device is connected with every other device.
  • Star topology → Each communicating device is connected to a central node.
  • Hybrid topology → Each branch can have one or more basic topologies.
Computer Science: CUET Mock Test - 6 - Question 26

Which of the following is an Arithmetic Exception?

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

The correct answer is option D.

Concept:
Arithmetic Error:

An arithmetic Error is simply an error that occurs during numeric calculations. ArithmeticError types in Python include:

Over Flow Error.
Zero Division Error.
Floating Point Error.
All of these errors have the potential to cause Python programming to crash. Because we do not want our code to fail as a result of improper input from us or a user, it is crucial to capture errors.

Example:
Zero Division Error.:

try:
  arithmetic = 5/0
  print(arithmetic)
except ArithmeticError:
  print('Has error')

Over Flow Error:
import math
try:
    print("The exponential value is")
    print(math.exp(1000))
except OverflowError as oe:
    print("After overflow", oe)

Floating Point Error:
It happens frequently when a system handles floating-point numbers internally. This issue arises from floating-point numbers' underlying representation, which employs a set number of binary digits to represent a decimal integer. Since it might be challenging to convert a decimal integer to binary, roundoff mistakes frequently occur.

Hence the correct answer is All the above.

Computer Science: CUET Mock Test - 6 - Question 27

Conversion of the domain name of each web server to its corresponding IP address is called _________________.

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

Concept:
Conversion of the domain name of each web server to its corresponding IP address is called domain name resolution. It is done through a server called DNS server.

  • A DNS server keeps a list of domain names and the IP addresses that go with them. Knowing how and where the DNS servers are housed is necessary to comprehend how domain name resolution functions.
  • The DNS servers are organized in a hierarchy. There are 13 servers known as root servers at the highest level. There are then other DNS servers at various levels below the root servers.
  • The HTTP protocol contacts a computer server called a DNS server when we type a URL into a web browser to get the IP address associated with that domain name.
  • The process of obtaining a physical address from a machine or a virtual address that a network node or computer peripheral has sent is known as address resolution or name resolution.
Computer Science: CUET Mock Test - 6 - Question 28

Which of the following is not a measure of central tendency

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

Mean is the arithmetic average of a data set. This is found by adding the numbers in a data set and dividing by the number of observations in the data set.
The median is the middle number in a data set when the numbers are listed in either ascending or descending order.
MODE is the value of the observation which has the maximum frequency.
The Standard deviation is a measure of dispersion. It is the action or process of distributing thing over a wide area (nothing about central location)
∴ The Standard deviation is not a measure of central tendency.

Computer Science: CUET Mock Test - 6 - Question 29

The method provided by Python to insert elements into a stack is:

Detailed Solution for Computer Science: CUET Mock Test - 6 - Question 29
  • Python provides the append() method to add elements to the top of a stack, until an overflow condition is encountered.
  • The operation of entering elements into a stack is called a Push operation, but Python does not have any in-built function with the same name.
  • The insert() and add() are not valid Python functions.
Computer Science: CUET Mock Test - 6 - Question 30

Which of the following sorting algorithms have a time complexity of n2?

Detailed Solution for Computer Science: CUET Mock Test - 6 - Question 30
  • In bubble sort, selection sort, and insertion sort, two loops are required to sort the array into an ascending or descending order.
  • The outer loop determines the number of passes and runs as many times as there are elements in the array.
  • The inner loop for bubble sort compares every element with the adjacent element to determine their order.
  • The inner loop for selection sort runs through the array to determine the smallest element and then swaps it to the relevant position.
  • The inner loop for insertion sort determines the correct position for an element in the sorted part of the list by running through the sorted list.
  • As a result, all three algorithms have two loops, each running approximately n times, where n is the number of elements in the array.
  • Therefore, the bubble sort, selection sort, and insertion sort algorithms all have a time complexity of n2.
Computer Science: CUET Mock Test - 6 - Question 31

Consider the array L = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]. Suppose you’re searching for the value 3 using binary search method. What is the value of the variable last after two iterations?

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

The starting values of first and last are 0 and 14 respectively.
The iterations are shown below:

Therefore, the value of the variable last is 2 after the first two iterations.

Computer Science: CUET Mock Test - 6 - Question 32

How many unique addresses the IPv4 can provide?

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

Concept:
The first IP address, known as version 4 (IPV4 for short), is a 32-bit numeric address. As more devices connected to the internet, it was apparent that the 32-bit IP address would not be enough as it only provides slightly less than 4.3 billion unique addresses.

Computer Science: CUET Mock Test - 6 - Question 33

Which of the following statement is true?

a,b= 56,0
try:
   a/b
except ZeroDivisionError:
   print("Hello")
except SyntaxError:
    print("Hi")
except ValueError:
    print("Okay")
else:
  print("Bye")

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

Concept:
SyntaxError:

It is raised when there is an error in the syntax of the Python code.
 ValueError:
It is raised when a built-in method or operation receives an argument that has the right data type but mismatched or inappropriate values.

ZeroDivisionError:
It is raised when the denominator in a division operation is zero.

Explanation:
a,b= 56,0
try:
   a/b
except ZeroDivisionError:
   print("Hello")
except SyntaxError:
    print("Hi")
except ValueError:
    print("Okay")
else:
  print("Bye")

The program has a,b= 56,0 means, a=56 and b=0.

And the try block raise the error because of Zero Division Error. That error was caught in the except block as e. The print statement prints that as "Hello" as output. 

Hence the correct answer is "Hello" 

Computer Science: CUET Mock Test - 6 - Question 34

In a deque, if insertion and deletion of elements are done from the opposite end, it behaves like which data structure?

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

Concept:

In a deque, if insertion and deletion of elements are done from the opposite end, it behaves like a Queue data structure. Insertion and deletion in queues take place from the opposite ends of the list. The insertion takes place at the rear of the list and the deletion takes place from the front of the list.

A stack is an ordered list in which all insertions and deletions are made at one end, called the top.
Deque (pronounced as “deck”) is an arrangement in which the addition and removal of element(s) can happen from any end, i.e. head/front or tail/rear.
Hence the correct answer is Queue.

Computer Science: CUET Mock Test - 6 - Question 35

Consider an array [1, 3, 2, 4]. How many iterations are needed to sort this array in the selection sort method?

Detailed Solution for Computer Science: CUET Mock Test - 6 - Question 35
  • The selection sort algorithm selects the smallest value at each iteration and places it in its correct position.
  • Since there are 4 elements in the given array, the algorithm works 3 times in order to sort the array in ascending order.
  • Even though the array is sorted in the 2nd pass, the selection sort runs three times.
Computer Science: CUET Mock Test - 6 - Question 36

What is the output for the given output?

import math
try:
    print(math.exp(1000))
except (SyntaxError, ValueError, IOError, OverflowError) as oe:
    print(oe)

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

Concept:
Declaring Multiple Exceptions:

The except clause in Python enables us to define numerous exceptions. When a try block throws many exceptions, declaring more than one exception might be helpful.
Syntax:
try:    
    #block of code         
except (<Exception 1>,<Exception 2>,<Exception 3>,...<Exception n>)    
    #block of code         
else:    
    #block of code  

SyntaxError:
It is raised when there is an error in the syntax of the Python code.

ValueError:
It is raised when a built-in method or operation receives an argument that has the right data type but mismatched or inappropriate values.

IOError:
It is raised when the file specified in a program statement cannot be opened. 

Explanation:
The given code is,
import math
try:
    print(math.exp(1000))
except (SyntaxError, ValueError, IOError, OverflowError) as oe:
    print(oe)

The Python "OverflowError: math range error" occurs when the result of a mathematical calculation is too large. Use a try/except block to handle the error or use the numpy module if you have to manipulate larger numbers.

Here The Math.exp(1000) function returns e^1000, where 1000 is the argument, and e is Euler's number. So it returns OverflowError: math range error as output.

Hence the correct answer is math range error.

Computer Science: CUET Mock Test - 6 - Question 37

Consider the array L = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]. Suppose you’re searching for the value 3 using binary search method. What is the value of the variable first after two iterations?

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

The starting values of first and last are 0 and 14 respectively.
The iterations are shown below:

Computer Science: CUET Mock Test - 6 - Question 38

what is the file offset position for file open modes < a > in python?

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

Concept:

<a>:

<a> Opens the file in append mode. If the file doesn’t exist, then a new file will be created. The File Offset position is the End of the file.

  • To append text to a text file, we must first build a file handle that creates an offset at the file's end. Offset, in its simplest form, refers to the location of the read/write pointer within the file.
  • Depending on the permissions granted, such as read, write, etc., offset is utilized afterward to carry out activities within the text file.

Example:

file = open (“abc.txt”, “a”)

Here the file opened in append mode. If a file whose name abc.txt doesn’t exist,  then a new file will be created.

Hence the correct answer is the End of the file.

Computer Science: CUET Mock Test - 6 - Question 39

Which method is used to sets the position of a file pointer?

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

Concept:
The seek() method :

This method is used to position the file object at a particular position in a file.

The syntax of seek() is:

file_object.seek(offset [ , reference_point])

In the above syntax, offset is the number of bytes by which the file object is to be moved. reference_point indicates the starting position of the file object. That is, with reference to which position, the offset has to be counted.

  • It can have any of the following values:
    • 0 - beginning of the file
    • 1 - current position of the file
    • 2 - end of file
  • By default, the value of reference_point is 0, i.e. the offset is counted from the beginning of the file.

Hence the correct answer is seek().

Computer Science: CUET Mock Test - 6 - Question 40

What is the output for the given python code?
try:    
    fileptr = open("file.txt","r")    
except (ArithmeticError, IOError) as e:
    print(e)
else:      
    print("Successfully Done")    
    fileptr.close()   

Note: Consider the file.txt, not at the current working directory. 

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

The correct answer is option C.

Concept:

The given python code is,

try:    
    fileptr = open("file.txt","r")    
except (ArithmeticError, IOError) as e:
    print(e)
else:      
    print("Successfully Done")    
    fileptr.close()   

Note: Consider the file.txt, not at the current working directory. 

Explanation:

According to the note, the file is not in the current working directory which means the compiler raises the IOError exception. That catches in the except block and that catches in the e variable. So the variable prints the error like "No such file or directory: 'file.txt' "

Hence the correct answer is No such file or directory: 'file.txt'.

8 docs|148 tests
Information about Computer Science: CUET Mock Test - 6 Page
In this test you can find the Exam questions for Computer Science: CUET Mock Test - 6 solved & explained in the simplest way possible. Besides giving Questions and answers for Computer Science: CUET Mock Test - 6, 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!