CUET Exam  >  CUET Tests  >  Computer Science: CUET Mock Test - 7 - CUET MCQ

Computer Science: CUET Mock Test - 7 - CUET MCQ


Test Description

30 Questions MCQ Test - Computer Science: CUET Mock Test - 7

Computer Science: CUET Mock Test - 7 for CUET 2024 is part of CUET preparation. The Computer Science: CUET Mock Test - 7 questions and answers have been prepared according to the CUET exam syllabus.The Computer Science: CUET Mock Test - 7 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 - 7 below.
Solutions of Computer Science: CUET Mock Test - 7 questions in English are available as part of our course for CUET & Computer Science: CUET Mock Test - 7 solutions in Hindi for CUET 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 - 7 | 40 questions in 45 minutes | Mock test for CUET preparation | Free important questions MCQ to study for CUET Exam | Download free PDF with solutions
Computer Science: CUET Mock Test - 7 - Question 1

The Programming language Python is named after:

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

The Programming language Python is named after a popular BBC comedy show "Monty Python's Flying Circus".

Computer Science: CUET Mock Test - 7 - Question 2

A relational database, which is in 3NF, may have undesirable data redundancy because there may exist

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

A relation is in third normal form, if there is no transitive dependency for non-prime attributes as well as it is in Second Normal Form.
A relation is in 3NF if at least one of the following conditions holds in every non-trivial function dependency X –> Y:

  • X is a super key.
  • Y is a prime attribute (each element of Y is a part of some candidate key).

In other words, a relation that is in First and Second Normal Form and in which no non-primary-key attribute is transitively dependent on the primary key, then it is in Third Normal Form (3NF).

1 Crore+ students have signed up on EduRev. Have you? Download the App
Computer Science: CUET Mock Test - 7 - Question 3

____ constraints apply only to individual column.

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

Table constraints allow you to specify more than one column in a PRIMARY KEY, UNIQUE, CHECK, or FOREIGN KEY constraint definition. Column-level constraints (except for check constraints) refer to only one column.

Computer Science: CUET Mock Test - 7 - Question 4

ALTER table can not _______.

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

ALTER table can not change column name. The simplest way to rename a column is to use the ALTER TABLE command with the RENAME COLUMN clause.

Computer Science: CUET Mock Test - 7 - Question 5

We know that RJ-45 is an eight-wire connector that connects a computer to LAN, especially Ethernets. Here, what is the expansion of RJ?

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

The eight-pin RJ45 connector is a standardised interface which often connects a computer to a local area network (LAN). This type of connector was originally developed for telephone communications but is now used in a range of applications. The abbreviation, RJ45, stands for Registered Jack-45.

Computer Science: CUET Mock Test - 7 - Question 6

Which of the following options is not correct?

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

If we try to read a text file that does not exist, the file gets created - this is an incorrect statement.

Computer Science: CUET Mock Test - 7 - Question 7

Study the following program:
x = 1
while true:
if x % 5 = = 0:
break print(x) x + = 1

What will be the output of this code?

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

Syntax error, there should not be a space between + and =.

Computer Science: CUET Mock Test - 7 - Question 8

Which of the following statements is incorrect in the context of binary files?

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

Every line ends with a new line character is incorrect in the context of Binary files.

Computer Science: CUET Mock Test - 7 - Question 9

A perfect hash function maps every input key to a unique index in the hash table. If the hash function is perfect, collisions will______.

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

A perfect hash function maps every input key to a unique index in the hash table. If the hash function is perfect, collisions will never occur.

Computer Science: CUET Mock Test - 7 - Question 10

What is searching?

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

Searching in data structure refers to the process of finding the required information from a collection of items stored as elements in the computer memory. These sets of items are in different forms, such as an array, linked list, graph, or tree.

Computer Science: CUET Mock Test - 7 - Question 11

For which constraints are indexes created when the constraint is added?

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

For primary key and unique constraints, the index is built on the constrained columns as a mechanism to detect duplicates as rows are added or updated. For referential constraints, the index is built on the referencing columns of the constraint.

Computer Science: CUET Mock Test - 7 - Question 12

Where would you look for errors from the database engine?

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

Alert logs contain important information about error messages and exceptions that occur during database operations.

Computer Science: CUET Mock Test - 7 - Question 13

What is the common technique of firewall?

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

Packet filter, application gateway, circuit-level gateway, and proxy server are the techniques of firewall.

Computer Science: CUET Mock Test - 7 - Question 14

What is spam?

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

Email spam, also known as unsolicited bulk email (UBE), or junk mail is the practice of sending unwanted email messages frequently with commercial content in large quantities.

Computer Science: CUET Mock Test - 7 - Question 15

Which protocol is the foundation of data communication for the World Wide Web?

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

The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web.

Computer Science: CUET Mock Test - 7 - Question 16

The return type of the input() function is:

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

The return type of the input() function is string.

Computer Science: CUET Mock Test - 7 - Question 17

What will be the output of the following Python code?

def f1(a,b=[]):
b.append(a)
return b
print (f1(2,[3,4]))

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

In the code shown above, the integer 2 is appended to the list [3,4]. Hence, the output of the code is [3,4,2]. Both variables a and b are local variables.

Computer Science: CUET Mock Test - 7 - Question 18

Syntax of seek function in Python is myfile.seek(offset, reference_point) where myfile is the file object. What is the default value of reference_point?

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

The reference_point is selected by the from_what argument. It accepts three values:
0: sets the reference_point at the beginning of the file.
1: sets the reference_point at the current file position.
2: sets the reference_point at the end of the file.
By default from_what argument is set to 0.

Computer Science: CUET Mock Test - 7 - Question 19

A company ABC Enterprises has four blocks of buildings as shown in the figure:

Center to center distance between various blocks:

Number of computers in each block:

Computers in each block are networked but blocks are not networked. The company has now decided to connect the blocks also.

Q. Suggest the most appropriate topology for the connections between the blocks.

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

In a star network, every host is connected to a central hub. In its simplest form, one central hub acts as a medium to transmit messages. The star topology reduces the impact of a transmission line failure by independently connecting each host to the hub.

Computer Science: CUET Mock Test - 7 - Question 20

A company ABC Enterprises has four blocks of buildings as shown in the figure:

Center to center distance between various blocks:

Number of computers in each block:

Computers in each block are networked but blocks are not networked. The company has now decided to connect the blocks also.

Q. Which one of the following devices will you suggest for connecting all the computers with in each of their blocks?

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

Switch increases the available bandwith of the network. It increases the performance of the network by reducing workload on individual host PCs. Hub is the central point of networking device that connects multiple hosting devices to one network.

Computer Science: CUET Mock Test - 7 - Question 21

A company ABC Enterprises has four blocks of buildings as shown in the figure:

Center to center distance between various blocks:

Number of computers in each block:

Computers in each block are networked but blocks are not networked. The company has now decided to connect the blocks also.

Q. Suggest the most appropriate location of the server, to get the best connectivity for maximum number of computers.

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

The number of computers in Block B1 are greater than any other building and the distance of Block B1 to Blocks B2, B3, and B4 is comparatively less than the distance between any other buildings.

Computer Science: CUET Mock Test - 7 - Question 22

A company ABC Enterprises has four blocks of buildings as shown in the figure:

Center to center distance between various blocks:

Number of computers in each block:

Computers in each block are networked but blocks are not networked. The company has now decided to connect the blocks also.

Q. The company wants internet accessibility in all the blocks. The suitable and cost-effective technology for that would be:

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

Broadband provides high speed internet access via multiple types of technologies including fiber opitcs, wireless, cable, DSL, and satellite.

Computer Science: CUET Mock Test - 7 - Question 23

A company ABC Enterprises has four blocks of buildings as shown in the figure:

Center to center distance between various blocks:

Number of computers in each block:

Computers in each block are networked but blocks are not networked. The company has now decided to connect the blocks also.

Q. The company is planning to link its head office situated in New Delhi with the offices in hilly areas. Suggest a way to connect it economically:

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

Radio waves or radio transmission is used for wide area networks and mobile cellular phones. It can cover larger areas and can penetrate through walls, plants, furniture etc. It is the primary mode of communication and is cheapest of all other modes.

Computer Science: CUET Mock Test - 7 - Question 24

What error does the following code produce?

num = 6

print(math.factorial(num))

Detailed Solution for Computer Science: CUET Mock Test - 7 - Question 24
  • The factorial() function is defined within the math module. The math module needs to be explicitly imported for using in a Python program. Since it has not been imported in the given code, a NameError is raised because the name ‘math’ is undefined.
  • The TypeError occurs when an incorrect data type value is provided to a function or an operator.
  • A ValueError occurs when the correct data type is passed to a function, but the value of the variable is unacceptable or incorrect.
  • The ImportError occurs when such a module is imported to a Python program that does not exist.
Computer Science: CUET Mock Test - 7 - Question 25

Python executes the else part of try-except-else:

Detailed Solution for Computer Science: CUET Mock Test - 7 - Question 25
  • The try-except-finally block is used to handle code which might raise an exception.
  • The code which might raise exceptions is placed within the try block.
  • All the probable exceptions are included distinct except blocks. The name of the expected exception is mentioned at the start of the except block.
  • In case the code within the try block leads to exceptions that are not defined or unexpected, we can include an except block which does not specify any particular exception. This block can catch unexpected or undefined errors encountered in the try block.
  • The else block comes after all the except blocks. This block contains code that is executed when the control enters neither of the except blocks. Thus, the else part is executed when no exception occurs.
Computer Science: CUET Mock Test - 7 - Question 26

Example 1:
Consider array has 4 elements and a searching element 16.
A[4]= {10, 16, 22, 25} 
The number of iterations are required to search an element by using a binary search= T1

Example 2:
Consider array has 4 elements and a searching element 22.
A[4]= {10, 16, 22, 25} 
The number of iterations are required to search an element by using a binary search= T2

Note: Searching is successful.

Which of the following statement are true?

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

Concept:
Binary Search:

A Binary Search is a sorting method used to find a specific member in a sorted array. Because binary search works only on sorted arrays, an array must be sorted before using binary search on it. As the number of iterations in the binary search reduces, it is a superior searching approach to the liner search technique.

Algorithm:
int binarySearch(int a[], int beg, int end, int K)    
{    
    int mid;    
    if(end >= beg)     
    {   mid = (beg + end)/2;    
        if(a[mid] == K)                 
            return mid+1;    
        else if(a[mid] < K) 
            return binarySearch(a, mid+1, end, K);      
        else   
            return binarySearch(a, beg, mid-1, K);            
    }    
    return -1;     
}   

Example 1:
The given data,
A[4]= {10, 16, 22, 25} 
Searching element= K= 16
beg= 0
end = 3
mid = 3/2 = 1
 if K with A[mid] and search is successful. 
Hence the number iterations are =1.

Example 2:
The given data,
A[4]= {10, 16, 22, 25} 
Searching element= K= 22
beg= 0
end = 3
mid = 3/2 = 1.
Compare 22 with A[1] is not found and K is greater than A[mid]. So  call binarySearch(a, 1+1, 3, 2); 
beg= 2
end = 3
mid = 5/2 = 2.
Compare 22 with A[2] is found.
Hence the number of iterations is = 2
Hence the correct answer is T1 < T2.

Computer Science: CUET Mock Test - 7 - Question 27

Consider the following student relation.

Student relation has Name, Subject1_Marks, and Subject2_Marks attributes.

What is the output for the given SQL query?
Query:
Select sum(subject1_Marks)+sum(Subject2_Marks)
From student;

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

The correct answer is option A.

Concept:
Sum():

It takes one set of values and gives one output. The SUM() function returns the total sum of a numeric column.
SUM() Syntax:
SELECT SUM(column_name)
FROM table_name
WHERE condition;
Explanation:
The given table is,
Consider the following student relation.
Student relation has Name, Subject1, and Subject2 attributes.

Query:
Select sum(subject1_Marks)+sum(Subject2_Marks)
From student;
Here calculates the sum of subject1 marks and subject2 individually. And finds the total sum of two subjects.
Note:
Here Sum() function ignores the null values whichever addition or subtraction or multiplication is required.
Subject1_Marks calculates the 10+20+30=60.
Subject2_marks calculates the 5+10+15+20+25=75
sum(subject1_Marks)+sum(Subject2_Marks)= 60+75= 135
Hence the correct answer is 135.

Computer Science: CUET Mock Test - 7 - Question 28

Is the following Python code valid?
try:
    # Do something
except [exception-name]:
    # Do something
except:
    # Do something

Detailed Solution for Computer Science: CUET Mock Test - 7 - Question 28
  • A try block must be followed by one or more except blocks. The except blocks may or may not specify exceptions.
  • After the except blocks, an else block may be added for the scenario when no exception is raised in the try block. This block is optional.
  • Following the else block, a finally block may be declared which will be executed whether or not an exception arises. This block is optional.
  • Thus, the given code snippet is correct.
Computer Science: CUET Mock Test - 7 - Question 29

The range of the following data 95, 115, 25, 20, 35, 55 is 

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

Given:
The given numbers are 95, 115, 25, 20, 35, 55

Calculation:
The largest value = xm = 115
And the smallest value = x0 = 20
⇒ Range = Largest value - Smallest value
⇒ Range = 115 - 20 = 95
∴ The range is 95

Computer Science: CUET Mock Test - 7 - Question 30

Which of the following sorting algorithm required the least swap to sort the following list?
L1: [52,18,16,12,36,26,22]

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

Selection sort is a sorting algorithm in which the smallest element always move to the extreme left corner of the list, 

Point to remember - If the array is sorted in ascending order, even though the selection sort takes the same number of comparisons, as of unsorted array. The maximum number of swaps and comparisons are required when the array is sorted in descending order. 

Now, applying selection sort on L1- [52,18,16,12,36,26,22]
Minimum element in the list is 12 , So, swap 52 with 12. 
After 1st pass - [12,18,16,52,36,26,22]    (1 swap) 

The minimum element is 16 now, swap 18 with 16. 
After 2nd pass - [12,16,18,52,36,26,22]  (1 swap) 

In the 3rd pass, no change as 18 is in the correct position. 
After 3rd pass - [12,16,18,52,36,26,22] 

Now, 22 is the minimum element, swap 52 with 22.
After 4th pass - [12,16,18,22,36,26,52]  (1 swap) 

Minimum element is now 26 , swap 36 , with 26 
After 5th pass - [12,16,18,22,26,36,52] (1 swap) 

Now, the list is already sorted after the 5th pass, so, a total of 4 swaps are required for the selection sort.
So, option 2 will be the answer. 

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

Top Courses for CUET

Download as PDF

Top Courses for CUET