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

Computer Science: CUET Mock Test - 7 - CUET MCQ


Test Description

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

Computer Science: CUET Mock Test - 7 for CUET 2025 is part of CUET Mock Test Series 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 2025 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 CUET Mock Test Series for CUET & Computer Science: CUET Mock Test - 7 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 - 7 | 50 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
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

Identify primary key in the given table student:

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

The correct answer is AdmNo

Key Points

  • The primary key in a database is a specific choice of attribute(s) which uniquely identifies each row in a table.
  • For the given table student, the attribute that satisfies this requirement is AdmNo.
  • Each student has a unique AdmNo, making it the best choice for a primary key in this context.
  • Therefore, the correct answer is: AdmNo
Computer Science: CUET Mock Test - 7 - Question 3

If a table has 5 tuples and 7 attributes, then what will be the degree and cardinality of the table?

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

The correct answer is Degree 7, Cardinality = 5

Key PointsThe degree of the table is 7, and the cardinality is 5.

  • Degree refers to the number of columns (attributes) in a table. In this case, the table has 7 attributes.
  • Cardinality refers to the number of rows (tuples) in a table. The table has 5 rows of data.

So, the correct answer is option 1: Degree 7, Cardinality = 5.

Computer Science: CUET Mock Test - 7 - Question 4

Find the output:

s = "CuEt #2022"

f = open("new.Txt", "w+")

f.write(s)

f.seek(0)

c = f.read(9)

for i in c:

if i.isupper():

print(i.lower(), end="#")

elif i.islower():

print(i.upper(), end="#")

elif int(i).isdigit():

print(int(i)+1, end="#")

else:

print("$", end="#")

f.close()

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

The correct answer is c#U#e#T#$#3#1#3#3#

Key Points

  • s = "CuEt #2022": This line creates a string variable s and assigns the value "CuEt #2022" to it.
  • f = open("new.Txt", "w+"): This line opens a new file named "new.Txt" in write-plus mode ("w+"). This mode allows both writing and reading to the file.
  • f.write(s): This line writes the content of the string s (which is "CuEt #2022") to the opened file.
  • f.seek(0): This line moves the file pointer to the beginning of the file. This is necessary because after writing, the pointer is at the end of the file.
  • c = f.read(9): This line reads the first 9 characters from the file and stores them in the variable c. Since the string we wrote is less than 9 characters, it will only read those characters.
  • Looping through c: The code then iterates through each character in the variable c using a loop.
  • if i.isupper(): If the character is uppercase, it converts it to lowercase and prints it followed by a "#" (hash symbol).
  • elif i.islower(): If the character is lowercase, it converts it to uppercase and prints it followed by a "#" (hash symbol).
  • elif int(i).isdigit(): If the character is a digit, it converts it to an integer, adds 1 to it, converts it back to a string, and prints it followed by a "#" (hash symbol).
  • else: If the character is none of the above (e.g., a special character), it prints "$" followed by a "#" (hash symbol).
  • f.close(): Finally, the code closes the opened file.

Here's how the loop works for each character:

  • 'C' (uppercase): Converted to lowercase 'c' and printed as "c#".
  • 'u' (lowercase): Converted to uppercase 'U' and printed as "U#".
  • 'E' (uppercase): Converted to lowercase 'e' and printed as "e#".
  • 't' (lowercase): Converted to uppercase 'T' and printed as "T#".
  • ' ' (space): Not an uppercase, lowercase, or digit, so printed as "$#". - **'#' (hash)**: Not an uppercase, lowercase, or digit, so printed as "$#".
  • '2' (digit): Converted to int, incremented by 1, converted back to string ('3'), and printed as "3#".
  • '0' (digit): Converted to int, incremented by 1, converted back to string ('1'), and printed as "1#".
  • '2' (digit): Converted to int, incremented by 1, converted back to string ('3'), and printed as "3#".
  • '2' (digit): Converted to int, incremented by 1, converted back to string ('3'), and printed as "3#".

As you can see, the output follows the logic of converting case, incrementing digits, and replacing special characters with "$".

Computer Science: CUET Mock Test - 7 - Question 5

Consider the table given below.

Identify the operation applied to the given tables to get the given output

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

The correct answer is TableA - TableB

Key Points

  • TableA X TableB: This is the Cartesian product operation, which combines each row in TableA with each row in TableB. It results in a table with many more rows than either TableA or TableB, depending on their row counts. This operation does not match the provided Output.
  • TableA ∪ TableB: This is the union operation, which combines all unique rows from both TableA and TableB. Duplicates are typically removed in a union operation, and the result will include rows unique to both tables and rows common to both tables but listed only once. The Output table listed does not match a union of TableA and TableB, as it does not include all unique entries from both tables.
  • TableA - TableB: This is the difference operation, which returns rows that are in TableA but not in TableB. It essentially removes rows from TableA that have exact matches in TableB based on the columns specified. The Output table matches this description, as it shows rows from TableA that are not found in TableB.
  • TableA ∩ TableB: This is the intersection operation, which returns rows that are common to both TableA and TableB. It essentially finds rows with the exact match across all columns specified in both tables. The Output table does not match an intersection of TableA and TableB because it excludes rows that are actually common to both tables (e.g., the rows for "Mahira" and "Sanjay").

Based on this analysis, the operation applied to obtain the given output is: TableA - TableB

Computer Science: CUET Mock Test - 7 - Question 6

Consider the given text file 'pledge.txt'

f=open('pledge.txt', 'r') #Statement 1
ine = f.readlines() #Statement 2
print(len(line)) #Statement 3
f.close() #Statement 4

Identify the correct output, will be given by statement 3.

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

The correct answer is 2

Key Points

  • f=open('pledge.txt', 'r') (Statement 1): This line opens the file named 'pledge.txt' in read mode. If the file doesn't exist, it will cause an error.
  • line = f.readlines() (Statement 2): This line reads all the lines from the opened file and stores them in a list variable named line. Since the file contains two lines, this list will have two elements.
  • print(len(line)) (Statement 3): This line calculates the length of the list line, which represents the number of lines in the file. As the list has two elements (one for each line), the output of this statement will be 2.
  • f.close() (Statement 4): This line closes the opened file, which is good practice to release resources.

Therefore, statement 3 (print(len(line))) will correctly print the number of lines in the file, which is 2.

Computer Science: CUET Mock Test - 7 - Question 7

Consider the following statements related to stacks and queues and choose the option that correctly identifies their validity.

  1. In a stack, the operation to remove an item is called "enqueue," while in a queue, it is called "dequeue."
  2. A queue follows the FIFO (First In, First Out) principle, allowing elements to be added at one end and removed from the other.
  3. The "push" operation is utilized in both stacks and queues for adding elements.
Detailed Solution for Computer Science: CUET Mock Test - 7 - Question 7

The correct answer is Only 2 is correct.

Key Points

  1. The first statement is incorrect. In a stack, the operation to remove an item is called "pop," not "enqueue." "Enqueue" is the term used in a queue for adding an item, and "dequeue" is correctly stated as the term for removing an item from a queue. Therefore, the description of the stack operation in this statement is incorrect.
  2. The second statement is accurate. A queue indeed operates on the FIFO (First In, First Out) principle. This characteristic means that items are added to one end of the queue (rear end) and removed from the other end (front end), maintaining the order in which elements were added.
  3. The third statement is incorrect. The "push" operation is specific to stacks, where it is used for adding elements. In contrast, the operation to add an element to a queue is called "enqueue," not "push." Therefore, the operation "push" is not utilized in queues for adding elements.
Computer Science: CUET Mock Test - 7 - Question 8

Which of the following is not a web browser?

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

The correct answer is Yandex

 

Key Points

  • Netscape: Netscape Navigator was one of the earliest web browsers, widely used in the 1990s. However, it has since been discontinued, and its popularity declined with the rise of other browsers.
  • Safari: Safari is a web browser developed by Apple Inc. It is the default browser on Apple devices, such as Mac computers, iPhones, and iPads.
  • Yandex: Yandex is a Russian multinational company that operates the largest search engine in Russia. While Yandex provides various online services, including a web browser called Yandex Browser, it is primarily known for its search engine.
  • Opera: Opera is a web browser developed by a Norwegian company called Opera Software. It's known for its speed and innovative features. Opera has versions for various operating systems, including Windows, macOS, and Linux.

In summary, Yandex is a company that offers a search engine and other services but is not a web browser itself. Yandex Browser, on the other hand, is a specific web browser developed by Yandex.

Computer Science: CUET Mock Test - 7 - Question 9
In Gmail, the email address of the recipients can be entered in __________ field.
Detailed Solution for Computer Science: CUET Mock Test - 7 - Question 9

The correct answer is To

Key Points

  • To field is generally for the main recipients of your email.
  • CC stands for carbon copy and BCC stands for blinding carbon copy.
  • CC and BCC are both ways of sending copies of an email to additional people.
  • It is used to send copies of an email to additional people by specifying multiple addresses in the To field.
  • BCC field of a message, those addresses are invisible to the recipients of the email.
  • Any email addresses that you place in the To field or the CC field are visible to everyone who receives the message.
  • You put four email addresses in the To field or put one email address in the To field and three in the CC field, the four people will all receive the same email.
  • They’ll also be able to see the email address of every other recipient in the To and CC fields.

Computer Science: CUET Mock Test - 7 - Question 10
What is the purpose of ARP (Address Resolution Protocol) ?
Detailed Solution for Computer Science: CUET Mock Test - 7 - Question 10

The correct answer is To map MAC addresses to IP addresses

Key Points

  • The Address Resolution Protocol (ARP) is used to map a known IP address to the corresponding physical (MAC) address on a local network.
  • When a device on a network wants to communicate with another device, it needs to know the MAC address of the target device.
  • ARP helps in resolving this mapping by broadcasting a request to all devices on the network, asking for the MAC address associated with a specific IP address.
  • The device that owns the IP address responds with its MAC address, allowing the requesting device to establish communication.
  • ARP is crucial for local network communication in the Ethernet protocol.
Computer Science: CUET Mock Test - 7 - Question 11

What is the output produced by following output code
def test():
try:
return 0
except:
print('error')
finally:
return 2
obj=test()
print(obj)

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

The correct option is 2

CONCEPT:
Try and Except statement is used to handle errors within code in Python.
The code inside the try block will be executed completely whenever there is no error in the program.
And whenever the program encounters an error in the try block, the except block will be executed.
The finally block will always be executed.

Syntax:
try:
# Code
except:
# Execut if an error occurs in the try block
finally:
#Always Executed

Explanation:
Here the first statement in the try block is executed successfully and returns 0 but in the case of exception handling the finally block is always required to be executed.
Thus the finally block will return 2 to the caller and hence 2 will be printed as the output.

Computer Science: CUET Mock Test - 7 - Question 12

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 12

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).

Computer Science: CUET Mock Test - 7 - Question 13

____ constraints apply only to individual column.

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

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 14

ALTER table can not _______.

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

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 15

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 15

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 16

Which of the following options is not correct?

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

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 17

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 17

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

Computer Science: CUET Mock Test - 7 - Question 18

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

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

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

Computer Science: CUET Mock Test - 7 - Question 19

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 19

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 20

What is searching?

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

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 21

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

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

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 22

Where would you look for errors from the database engine?

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

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

Computer Science: CUET Mock Test - 7 - Question 23

What is the common technique of firewall?

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

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

Computer Science: CUET Mock Test - 7 - Question 24

What is spam?

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

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 25

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

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

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 26

The return type of the input() function is:

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

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

Computer Science: CUET Mock Test - 7 - Question 27

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 27

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 28

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 28

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 29

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 29

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 30

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 30

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.

View more questions
8 docs|148 tests
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
Download as PDF