CUET Computer Science Question Paper 2024 is available here for download. NTA conducted CUET 2024 Computer Science paper on 22 May in Shift 1. CUET Computer Science Question Paper 2024 is based on objective-type questions (MCQs). Candidates get 60 minutes to solve 40 MCQs out of 50 in CUET 2024 question paper for Computer Science.
CUET Computer Science Question Paper 2024 PDF Download
| CUET 2024 Computer Science Question Paper with Solution | Check Solutions |
CUET Computer Science Question Paper 2024 with Solution
Question 1:
Which of the following are used in python exception handling?
(A) try
(B) except
(C) finally
(D) seek
Choose the correct answer from the options given below:
View Solution
Python exception handling involves the use of the keywords ‘try', 'except', and 'finally'. The 'try' block allows you to test a block of code for errors. The 'except' block allows you to handle the error, and the 'finally' block lets you execute code, regardless of the result of the try and except blocks. ‘seekʻ is not used in exception handling.
Quick Tip: Remember: Python's exception handling uses ‘try', 'except', and 'finally' for handling errors in a structured way.Match List-I with List-II:
List-I
(A) f.seek(-10,1)
(B) f.seek(10,1)
(C) f.seek(10)
(D) f.seek(-10,2)
List-II
(II) From current position, move 10 bytes backward
(III) From current position, move 10 bytes forward
(I) From beginning of file, move 10 bytes forward
(IV) From end of the file, move 10 bytes backward
Choose the correct answer from the options given below:
View Solution
The ‘seek()' function in Python's file handling is used to move the file pointer. The first argument specifies the number of bytes to move, and the second argument specifies the reference point. '1' means the current position, and '2' means the end of the file.
Quick Tip: Understand the ‘seek()' function to manipulate file pointers efficiently in Python.Arrange the following in correct order of exception handling in python:
(A) Write the code that may raise an exception inside a try block
(B) Execute some code regardless of whether the exception occurs or not using the finally block
(C) Handle the specific exception using the except block
(D) Raise the exception using the raise statement if necessary
Choose the correct answer from the options given below:
View Solution
In Python, the correct order for exception handling is to first write potentially error-prone code inside the 'try' block. Then, catch specific exceptions in the 'except block. If needed, raise exceptions using 'raise', and finally execute clean-up actions in the ‘finally' block.
Quick Tip: The typical flow for handling exceptions in Python follows the order: ‘try', 'except', 'raise', and 'finally'.How many candidate keys are possible with the table below?
(Table with columns: RollNo, Name, Mobile, City)
View Solution
For this table, the ‘RollNoʻ is unique for each student, so it can be a candidate key. 'Mobile' is also unique for each student, making it another candidate key.
Quick Tip: In relational databases, candidate keys are minimal sets of attributes that uniquely identify each tuple.Which of the following is not a limitation of file systems?
View Solution
File systems often suffer from limitations such as data redundancy, inconsistency, and dependence, but storage space is generally not considered a direct limitation of file systems.
Quick Tip: Data redundancy and inconsistency are common issues in traditional file systems.Match List-I with List-II:
List-I
(A) Controlled Data Sharing
(B) Data Isolation
(C) Data Dependence
(D) Data Inconsistency
List-II
(II) Limited Access given to users
(III) There is no mapping between two files
(IV) If the structure of a file is changed, all the existing programs accessing that file also need to be changed
(I) Same data maintained in different places does not match
Choose the correct answer from the options given below:
View Solution
Data issues such as inconsistency, isolation, dependence, and sharing are common in file systems. Understanding these terms and their implications is critical for effective data management.
Quick Tip: Match the definitions carefully when dealing with data management issues.Which of the following is called database instance?
View Solution
A database instance refers to the state of the data in a database at a particular moment, or a snapshot of the data.
Quick Tip: A database instance represents the data stored in a database at a particular moment in time.What is the output of the following SQL statement? SQL: SELECT MID('CUET2024',2,5)
View Solution
The ‘MID()' function extracts a substring starting from the 2nd character and includes 5 characters from that point, resulting in ‘ET202‘.
Quick Tip: Use the 'MID()' function to extract substrings based on specified positions in SQL.SQL applies conditions on the groups through ____ clause after groups have been formed.
View Solution
In SQL, the ‘HAVINGʻ clause is used to apply conditions on the groups after the 'GROUP BY' clause.
Quick Tip: Use the 'HAVINGʻ clause to filter records that involve aggregate functions.Consider the following two tables emp1 and emp2:
emp1 (Id, Name) : (1, Amit), (2, Punita)
emp2 (Id, Name) : (1, Punita), (2, Anand)
What is the output of the following query? SELECT name from emp1 minus SELECT name from emp2;
View Solution
The ‘MINUSʻ operation in SQL returns the difference between two datasets. In this case, it retrieves the names from 'emp1' that are not present in 'emp2'. Since "Punita" is present in both ‘emp1' and 'emp2', the remaining name in 'emp1' is "Amit”.
Quick Tip: The ‘MINUS' operator in SQL returns only the rows from the first query that are not in the result of the second query.Which of the following statement(s) is/are TRUE regarding computer network?
(A) Interspace is a software that allows multiple users in a client-server environment to communicate with each other by sending and receiving data of various types.
(B) IP address is a unique permanent value associated with a network adapter called a NIC.
(C) A computer network is an interconnection among two or more computers or computing devices to share data and resources.
(D) The term 'Workstation' refers to the most powerful computer of the network that facilitates sharing of data, software, and hardware resources on the network and has more memory, processing power, and storage than a normal node.
Choose the correct answer from the options given below:
View Solution
Statement (C) and (D) are correct. A computer network involves the interconnection of two or more devices to share data and resources, and a workstation is indeed a powerful computer in the network context. Statement (A) is incorrect as "Interspace" is not the right term, and (B) is incorrect because an IP address is not permanent; it may change based on the configuration.
Quick Tip: A workstation is a high-performance computer used for complex computations or intensive data processing.Communication over mobile phone is an example of which type of communication mode?
View Solution
Mobile phone communication is an example of full-duplex communication, where data can be transmitted and received simultaneously by both parties.
Quick Tip: In full-duplex communication, both the sender and receiver can transmit and receive data simultaneously.Which of the following device provides the necessary translation of data received from network into a format or protocol recognized by devices within the internal network?
View Solution
A gateway is a network device that translates and communicates data between different network protocols, allowing devices on one network to communicate with devices on another network using different protocols.
Quick Tip: A gateway connects networks that use different protocols and performs data translation.A long cable that helps to connect several devices in bus topology having terminators at both ends to prevent signal bounce is known as ________.
View Solution
In a bus topology, the backbone cable connects all devices in the network and has terminators at both ends to prevent signal reflection or bounce.
Quick Tip: In bus topology, the backbone cable is the primary communication line that connects all nodes in the network.Match List-I with List-II:
List-I
(A) readline()
(B) writelines()
(C) seek()
(D) flush()
List-II
(I) Writes a sequence of strings to the file
(II) Reads a single line from the file
(III) Force any buffered output to be written to the file
(IV) Moves the file pointer to the specified position
Choose the correct answer from the options given below:
View Solution
Each of these file operations serves a different purpose in Python. ‘readline()‘ reads one line from the file, ‘writelines()‘ writes a sequence of strings to the file, ‘seek()‘ moves the file pointer to a specific position, and ‘flush()' forces the buffer to write any unsaved data to the file.
Quick Tip: Understand Python's file operations to read, write, and manipulate file data effectively.What is pickling?
View Solution
Pickling in Python is the process of serializing objects into a byte stream, which can then be saved to a file or transferred across networks. The reverse process is called unpickling.
Quick Tip: Use Python's 'pickle' module to serialize and deserialize complex data structures.Consider the following code and specify the correct order of the statements to be written:
Code:
(A) f.write("CUET EXAMINATION”)
(B) f=open("CUET.TXT", "w")
(C) print("Data is Written Successfully")
(D) f.close()
Choose the correct answer from the options given below:
View Solution
In Python, the correct sequence for file handling includes opening the file ('open()'), writing to the file (‘write()'), printing a success message (‘print()'), and then closing the file (‘close()').
Quick Tip: Always remember to close the file after performing file operations to avoid resource leaks.Which method from below will take a file pointer to nth character with respect to r position?
View Solution
In Python, the ‘seek()ʻ method moves the file pointer to a specified location in the file. The ‘seek(n, r)' method moves the file pointer to the 'n‘th character with respect to the 'r' reference position, where 'r' can be the start, current, or end of the file.
Quick Tip: Use 'seek()' in Python to manipulate file pointers for reading or writing at specific locations.Evaluate the given postfix expression: Expression: 3 5 * 6 + 2 3 * -
View Solution
To evaluate a postfix expression, we use a stack to store the operands and apply operators as they appear.
1. Push 3 onto the stack.
2. Push 5 onto the stack.
3. Apply '*' to the top two elements: 3 × 5 = 15, push 15 onto the stack.
4. Push 6 onto the stack.
5. Apply '+' to the top two elements: 15 + 6 = 21, push 21 onto the stack.
6. Push 2 onto the stack.
7. Push 3 onto the stack.
8. Apply '*' to the top two elements: 2 × 3 = 6, push 6 onto the stack.
9. Apply '-' to the top two elements: 21 – 6 = −17, push -17 onto the stack. The result of the postfix expression is -17.
Stack works on the principle of ________.
View Solution
A stack follows the **LIFO** (Last In First Out) principle, where the last element added is the first one to be removed. This is commonly seen in stack-based memory management and undo functionalities.
Quick Tip: Remember, in a stack, the last element added is the first one to be removed (LIFO principle).Match List-I with List-II:
List-I (Term)
(A) Prefix
(B) Postfix
(C) Queue
(D) Stack
List-II (Description)
(I) In this, the element entered first will be removed last
(II) In this, the element entered first will be removed first.
(III) In this, the operator is placed before the operands.
(IV) In this, the operator is placed after the operands.
Choose the correct answer from the options given below:
View Solution
In prefix notation, the operator is placed before the operands, while in postfix, it is placed after. A queue operates on a FIFO (First In First Out) principle, and a stack follows the LIFO (Last In First Out) principle.
Quick Tip: In postfix, the operator follows the operands, while in prefix, the operator comes before the operands.What will be the sequence of elements removed from the stack after performing the following operations?
Operations:
PUSH(10)
PUSH(20)
POP()
POP()
PUSH(30)
PUSH(40)
POP()
POP()
Options:
(A) 10
(B) 20
(C) 30
(D) 40
Choose the correct sequence from the options given below:
View Solution
The stack works on the **LIFO** (Last In First Out) principle. After the ‘PUSH‘ and 'POP' operations, the sequence of elements removed will be: 20 (first POP), 10 (second POP), 40 (third POP), and 30 (fourth POP).
Quick Tip: Always remember, in stack operations, the most recently pushed element is the first to be popped (LIFO).In Python, ______ module needs to be imported for implementing Double Ended Queue.
View Solution
The ‘deque' (Double-Ended Queue) is implemented in Python using the 'collections' module. It allows append and pop operations on both ends of the deque with O(1) time complexity.
Quick Tip: Use the 'collections.deque' in Python when you need efficient operations at both ends of the queue.What will be the position of front and rear after execution of the following statements, the Queue already had the given elements in FIFO order:
F-> 50 -> 90 -> 7 -> 21 -> 73 -> 77->R
dequeue()
dequeue()
dequeue()
dequeue()
dequeue()
enqueue(100)
dequeue()
View Solution
The initial queue state is 50 → 90 → 7 → 21 → 73 → 77. After five ‘dequeue()‘ operations, the queue becomes empty. After ‘enqueue(100)' and one more ‘dequeue()', the front is at 77 and the rear is at 100.
Quick Tip: Always remember that in a queue, the front points to the element to be removed first (FIFO principle), and the rear points to the last inserted element.________ data type is used to implement Queue data structure in Python.
View Solution
In Python, a queue can be implemented using a **list**, which supports the append operation to add elements at the rear and the pop operation to remove elements from the front.
Quick Tip: Use Python's list data structure for simple queue implementations, but for efficient double-ended queues, use the ‘collections.deque'.Choose the statements that are correct.
(A) For Binary Search, all the elements have to be sorted.
(B) For Linear Search, all the elements have to be sorted.
(C) Linear Search takes less time for searching in worst case than binary search's worst case.
(D) Linear Search always gives fast result whether elements are sorted or not.
Choose the correct answer from the options given below:
View Solution
Binary search only works on sorted data, and it has a worst-case time complexity of O(log n). Linear search, although slower in the average case, has a time complexity of O(n) in the worst case and can handle unsorted data.
Quick Tip: Binary search is more efficient for sorted data, while linear search works on both sorted and unsorted data.Arrange the following in the ascending order of their time complexity.
(A) Worst Case of Linear Search
(B) Best Case of Binary Search
(C) Worst Case of Binary Search
(D) Worst Case of Bubble Sort
Choose the correct sequence from the options given below:
View Solution
The best case for binary search is O(1), worst-case linear search is O(n), worst-case binary search is O(log n), and the worst-case for bubble sort is O(n²). So the correct order of time complexity is: (B) Best Case of Binary Search < (A) Worst Case of Linear Search < (C) Worst Case of Binary Search < (D) Worst Case of Bubble Sort.
Quick Tip: Always remember the time complexities for basic algorithms like linear search, binary search, and sorting algorithms like bubble sort.How many minimum number of comparison(s) can be required to search an element from 'n' elements, in case of Linear Search?
View Solution
In the best case scenario for a linear search, the target element is the first element in the list, so only 1 comparison is required. This is the minimum number of comparisons for a linear search.
Quick Tip: For linear search, the best case scenario occurs when the target element is found in the first position.Which of the statement(s) is/are True for the given question.
Data elements are: 7, 5, 17, 13, 9, 27, 31, 25, 35.
Hash Table Size: 7
Hash Function: H(I) = (Data element) mod (Hash Table Size)
(A) Element 27 will create collision.
(B) Element 25 will create collision.
(C) Element 35 will create collision.
(D) Element 31 will create collision.
Choose the correct answer from the options given below:
View Solution
Using the hash function H(I) = (Data element) mod 7, calculate the hash values for each element. Elements 27, 35, and 31 will create collisions as they have the same hash value: H(27) = 6, H(35) = 0, H(31) = 3. Therefore, (A), (C), and (D) are correct.
Quick Tip: Collisions occur when two elements have the same hash value. The modulus operator in the hash function determines the remainder when dividing the data element by the hash table size.If a list contains 'n' number of elements and all the elements are by default sorted in ascending order, how many comparisons will be required during 1st pass of bubble sort to arrange the list in ascending order?
View Solution
In the first pass of Bubble Sort, comparisons are made between adjacent elements. Even if the list is already sorted, Bubble Sort will still make comparisons between all 'n-1‘ pairs of elements, but no swaps will be made since the list is already sorted.
Quick Tip: In Bubble Sort, each pass involves comparing adjacent elements even if no swaps are needed.What will be the result after pass 2 using Bubble Sort, if we are sorting elements in ascending order?
Initial List: 7 19 18 9 23 51 12 54 73
View Solution
After the first pass of Bubble Sort, the largest element (73) moves to the last position. In the second pass, the second largest element (54) moves to its correct position. The result after two passes is: 7 9 18 19 23 51 12 54 73.
Quick Tip: In Bubble Sort, each pass moves the largest unsorted element to its correct position.______ compares neighboring elements only and swaps them when necessary.
View Solution
Bubble Sort works by repeatedly comparing adjacent elements in a list and swapping them if they are in the wrong order.
Quick Tip: Bubble Sort is known for its simplicity and repeatedly swapping adjacent elements until the list is sorted.______ are the unorganized facts that can be processed to generate meaningful information.
View Solution
Data refers to raw, unorganized facts that can be processed to generate meaningful information. Once processed, data becomes information that is useful for decision-making.
Quick Tip: Data is unprocessed and raw, while information is processed and structured, making it meaningful.______ is the positive square root of the average of squared differences of each value from the mean.
View Solution
Standard deviation is a measure of how spread out the values in a dataset are. It is calculated as the positive square root of the variance, which is the average of the squared differences from the mean.
Quick Tip: Standard deviation helps quantify the variation or dispersion of a dataset.Consider the stock prices for shares of a company A for a week. To find the difference of maximum and minimum value of the share price which statistical technique can be used:
View Solution
Range is the simplest measure of spread or variability in a dataset. It is the difference between the highest and lowest values, which is useful when comparing stock prices over a period.
Quick Tip: Range is a quick way to understand the spread of data and compare the extremes.What is the primary difference between a database and a file system?
View Solution
A database system provides a structured way to store, manage, and retrieve data, including relationships between data entities. In contrast, a file system simply stores data in files and directories, without providing direct support for relationships.
Quick Tip: Databases excel at handling structured data and complex relationships, unlike file systems.A domain in a relational database refers to:
View Solution
In a relational database, a domain represents the set of possible values that an attribute (column) can take. It defines the permissible values for that attribute.
Quick Tip: A domain defines the type of data allowed for a column or attribute in a relational database.A relation in a relational database is also known as:
View Solution
In relational databases, a "relation” is essentially a table. A table consists of rows and columns where each row represents a record, and each column represents an attribute.
Quick Tip: In a relational database, the terms "relation" and "table” are used interchangeably.The primary key is chosen from ________.
View Solution
The primary key is typically chosen as the simplest candidate key, which uniquely identifies each row in a table and does not allow 'NULL' values.
Quick Tip: A primary key should always be unique, non-null, and simple for efficient access.An alternate key is ________.
View Solution
An alternate key is a candidate key that is not chosen as the primary key. It can still uniquely identify records in a table but is not used as the main identifier.
Quick Tip: While the primary key is used for main identification, alternate keys serve as backup identifiers.Consider the following SQL functions:
(A) CURDATE()
(B) CURRENT_DATE()
(C) CURRENT_DATE
(D) TODAY()
View Solution
In SQL, functions like ‘CURDATE()‘, ‘CURRENTDATE()‘, and ‘CURRENT_DATE‘ return the current date. However, ‘TODAY()‘ is not a standard SQL function.
Quick Tip: To fetch the current date in SQL, you can use ‘CURDATE()ʻ or ‘CURRENT_DATE()‘.Which of the following is correct syntax for inserting foreign key constraint in a relation?
View Solution
The correct syntax for adding a foreign key in SQL is through the ‘ALTER TABLE' statement, where the ‘FOREIGN KEY‘ constraint is added, and it references a column in another table.
Quick Tip: The foreign key in SQL is used to establish a relationship between two tables.What is the result of the following arithmetic operation in SQL? SELECT 5 + NULL AS RESULT
View Solution
In SQL, any arithmetic operation with ‘NULLʻ results in ‘NULL‘. Since ‘NULL‘ represents the absence of a value, adding it to any number still yields ‘NULL‘.
Quick Tip: In SQL, any operation with ‘NULL‘ results in ‘NULL‘ unless specifically handled by functions like 'COALESCE‘.Which of the following expressions in SQL would calculate the square root of 16?
View Solution
In SQL, the ‘POWER‘ function is used to raise a number to a specific exponent. To calculate the square root, the number is raised to the power of 0.5. Hence, ‘POWER(16, 0.5)' gives the square root of 16, which is 4.
Quick Tip: Use 'POWER(number, 0.5)' to calculate the square root of any number in SQL.Question 45:
Which of the following statement(s) is/are TRUE in respect of Media Access Control (MAC) Address?
(A) It can be changed if a node is removed from one network and connected to another network.
(B) Each MAC address is a 12-digit hexadecimal number.
(C) It is a unique value associated with a network adapter called NIC.
(D) It is provided by the Internet Service Provider to locate computers connected to the internet.
Choose the correct answer from the options given below:
View Solution
A Media Access Control (MAC) address is a unique identifier assigned to a network interface controller (NIC). It is typically a 12-digit hexadecimal number. The MAC address is used for communication within a network segment but is not provided by the Internet Service Provider (ISP).
Quick Tip: MAC addresses are unique to each device and are critical for network communication within local networks.Match List-I with List-II:
List-I (Device)
(A) RJ45 Connector
(B) Bridge
(C) Gateway
(D) Repeater
List-II (Use)
(I) Relay frames between two originally separate segments that follow same protocols.
(II) Amplifies a signal that is transmitted across the network so that the signal is received same as it is sent.
(III) Establishes an intelligent connection between a local area network and external networks with completely different structures.
(IV) Plug-in device primarily used for connecting LANs particularly Ethernet.
View Solution
**RJ45 Connector**: used for connecting Ethernet cables, commonly within LANs (Local Area Networks).
**Bridge**: used to relay frames between separate segments of a network that follow the same protocol.
**Gateway**: establishes connections between different networks using different protocols.
**Repeater**: amplifies a signal in the network to extend its reach.
What is the purpose of Domain Name System (DNS) Server in networking?
View Solution
The Domain Name System (DNS) translates human-readable domain names into machine-readable IP addresses. This allows users to access websites without needing to remember numerical IP addresses.
Quick Tip: DNS is often referred to as the "phonebook of the internet” because it maps domain names to IP addresses.140.168.220.200 is a 32-bit binary number usually represented as 4 decimal values, each representing 8 bits, in the range 0 to 255 separated by decimal points. What is this number called?
View Solution
An IP (Internet Protocol) address is a 32-bit number divided into four octets (each 8 bits), commonly written in dotted decimal format (e.g., 140.168.220.200). It uniquely identifies devices on a network.
Quick Tip: IP addresses help route data between devices on different networks.In a ______ topology, if there are n devices in a network, each device has (n-1) ports for cables.
View Solution
In a mesh topology, every device is connected to every other device. For a network with n devices, each device requires n-1 ports to maintain full connections with all other devices.
Quick Tip: Mesh topology provides high redundancy and reliability, but it requires a lot of cabling and ports.Amit wants to be familiar with SQL. One of his friends Anand suggests him to execute the following SQL commands:
(A) Create Table Student
(B) Use Database DB
(C) Select * from Student
(D) Insert into Student
In which order Amit needs to run the above commands?
View Solution
The correct sequence of commands Amit should run is: - First, select the **Database** using ‘USE DATABASE DB‘. - Then, **create** the ‘Student' table using the 'CREATE TABLEʻ statement. - After the table is created, Amit can **insert** data using 'INSERT INTO‘. - Finally, he can **select** data using the 'SELECT' statement.
Quick Tip: Always ensure that a database is selected before creating tables and running queries in SQL.


Comments