CUET Computer Science Question Paper 2024 (Available)- Download Solutions and Answer Key pdf

Shivam Yadav's profile photo

Shivam Yadav

Updated 3+ months ago

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 download iconDownload 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:

  • (1) (A), (B), and (D) only
  • (2) (A), (B), and (C) only
  • (3) (A), (B), (C), and (D)
  • (4) (B), (C), and (D) only
Correct Answer: (2) (A), (B), and (C) only
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.

Question 2:

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:

  • (1) (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
  • (2) (A) - (II), (B) - (III), (C) - (IV), (D) - (I)
  • (3) (A) - (III), (B) - (II), (C) - (IV), (D) - (I)
  • (4) (A) - (II), (B) - (III), (C) - (I), (D) - (IV)
Correct Answer: (4) (A) - (II), (B) - (III), (C) - (I), (D) - (IV)
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.

Question 3:

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:

  • (1) (A), (B), (C), (D)
  • (2) (A), (C), (B), (D)
  • (3) (B), (A), (D) ,(C)
  • (4) (C), (B), (D), (A)
Correct Answer: (2) (A), (C), (B), (D)
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'.

Question 4:

How many candidate keys are possible with the table below?

(Table with columns: RollNo, Name, Mobile, City)

  • (1) One
  • (2) Two
  • (3) Three
  • (4) Four
Correct Answer: (2) Two
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.

Question 5:

Which of the following is not a limitation of file systems?

  • (1) Data Redundancy
  • (2) Data Inconsistency
  • (3) Data dependence
  • (4) Storing Space
Correct Answer: (4) Storing Space
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.

Question 6:

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:

  • (1) (A) - (II), (B) - (III), (C) - (IV), (D) - (I)
  • (2) (A) - (II), (B) - (III), (C) - (I), (D) - (IV)
  • (3) (A) - (IV), (B) - (II), (C) - (III), (D) - (I)
  • (4) (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Correct Answer: (1) (A) - (II), (B) - (III), (C) - (IV), (D) - (I)
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.

Question 7:

Which of the following is called database instance?

  • (1) Overall design of the database
  • (2) The snapshot of the database at any given time
  • (3) Data about the data
  • (4) Restriction on the type of data inserted
Correct Answer: (2) The snapshot of the database at any given time
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.

Question 8:

What is the output of the following SQL statement? SQL: SELECT MID('CUET2024',2,5)

  • (1) UET2
  • (2) UET20
  • (3) ET202
  • (4) CUET2
Correct Answer: (3) ET202
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.

Question 9:

SQL applies conditions on the groups through ____ clause after groups have been formed.

  • (1) where
  • (2) having
  • (3) new
  • (4) all
Correct Answer: (2) having
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.

Question 10:

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;

  • (1) Punita
  • (2) Amit
  • (3) Anand
  • (4) Amit, Punita
Correct Answer: (2) Amit
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.

Question 11:

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:

  • (1) (A) and (C) only
  • (2) (A), (B) and (C) only
  • (3) (C) and (D) only
  • (4) (B) and (D) only
Correct Answer: (3) (C) and (D) only
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.

Question 12:

Communication over mobile phone is an example of which type of communication mode?

  • (1) Simplex
  • (2) Half-Duplex
  • (3) Full-Duplex
  • (4) Double-Duplex
Correct Answer: (3) Full-Duplex
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.

Question 13:

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?

  • (1) Bridge
  • (2) Gateway
  • (3) Router
  • (4) Modem
Correct Answer: (2) Gateway
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.

Question 14:

A long cable that helps to connect several devices in bus topology having terminators at both ends to prevent signal bounce is known as ________.

  • (1) Drop Line
  • (2) Taps
  • (3) Analog Cable
  • (4) Backbone
Correct Answer: (4) Backbone
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.

Question 15:

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:

  • (1) (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
  • (2) (A) - (II), (B) - (I), (C) - (IV), (D) - (III)
  • (3) (A) - (II), (B) - (I), (C) - (III), (D) - (IV)
  • (4) (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Correct Answer: (2) (A) - (II), (B) - (I), (C) - (IV), (D) - (III)
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.

Question 16:

What is pickling?

  • (1) It is used to deserialize objects, i.e., converting the byte stream to object hierarchy.
  • (2) It is used to serialize objects, i.e., to convert Python object hierarchy to byte stream.
  • (3) It is used to move the file pointer to a specific location.
  • (4) It is used in exception handling.
Correct Answer: (2) It is used to serialize objects, i.e., to convert Python object hierarchy to byte stream.
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.

Question 17:

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:

  • (1) (A), (B), (C), (D)
  • (2) (B), (A), (C), (D)
  • (3) (B), (D), (C), (A)
  • (4) (B), (D), (A), (C)
Correct Answer: (2) (B), (A), (C), (D)
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.

Question 18:

Which method from below will take a file pointer to nth character with respect to r position?

  • (1) fp.seek(r)
  • (2) fp.seek(n)
  • (3) fp.seek(n,r)
  • (4) seek(n,r).fp
Correct Answer: (3) fp.seek(n,r)
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.

Question 19:

Evaluate the given postfix expression: Expression: 3 5 * 6 + 2 3 * -

  • (1) 39
  • (2) 15
  • (3) -9
  • (4) -17
Correct Answer: (4) -17
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.

Quick Tip: In postfix expressions, evaluate from left to right using a stack to handle operations in sequence.

Question 20:

Stack works on the principle of ________.

  • (1) Mid Element First
  • (2) First In First Out
  • (3) Last In First Out
  • (4) Last In Last Out
Correct Answer: (3) Last In First Out
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).

Question 21:

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:

  • (1) (A) - (III), (B) - (IV), (C) - (II), (D) - (I)
  • (2) (A) - (IV), (B) - (III), (C) - (II), (D) - (I)
  • (3) (A) - (I), (B) - (II), (C) - (IV), (D) - (III)
  • (4) (A) - (II), (B) - (I), (C) - (III), (D) - (IV)
Correct Answer: (2) (A) - (IV), (B) - (III), (C) - (II), (D) - (I)
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.

Question 22:

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:

  • (1) (A), (B), (C), (D)
  • (2) (B), (A), (D), (C)
  • (3) (B), (A), (D), (C)
  • (4) (B), (A), (C), (D)
Correct Answer: (3) (B), (A), (D), (C)
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).

Question 23:

In Python, ______ module needs to be imported for implementing Double Ended Queue.

  • (1) counter
  • (2) collections
  • (3) random
  • (4) numpy
Correct Answer: (2) collections
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.

Question 24:

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

  • (1) Front 50, Rear 77
  • (2) Front 100, Rear 100
  • (3) Front 77, Rear 100
  • (4) Front 73, Rear 77
Correct Answer: (3) Front 77, Rear 100
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.

Question 25:

________ data type is used to implement Queue data structure in Python.

  • (1) Sets
  • (2) Dictionary
  • (3) Tuple
  • (4) List
Correct Answer: (4) List
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'.

Question 26:

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:

  • (1) (A) only
  • (2) (A) and (C) only
  • (3) (B), and (C) only
  • (4) (A), (B), and (D) only
Correct Answer: (2) (A) and (C) only
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.

Question 27:

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:

  • (1) (A), (B), (C), (D)
  • (2) (B), (D), (A), (C)
  • (3) (B), (A), (C), (D)
  • (4) (B), (C), (A), (D)
Correct Answer: (3) (B), (A), (C), (D)
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.

Question 28:

How many minimum number of comparison(s) can be required to search an element from 'n' elements, in case of Linear Search?

  • (1) 1
  • (2) n - 1
  • (3) n
  • (4) n + 1
Correct Answer: (1) 1
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.

Question 29:

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:

  • (1) (A), (B), and (C) only
  • (2) (A), (C), and (D) only
  • (3) (B), (C), and (D) only
  • (4) (A), and (D) only
Correct Answer: (2) (A), (C), and (D) only
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.

Question 30:

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?

  • (1) 0
  • (2) 1
  • (3) n - 1
  • (4) n
Correct Answer: (3) n - 1
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.

Question 31:

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

  • (1) 7 18 19 9 23 12 51 54 73
  • (2) 7 9 18 19 12 23 51 54 73
  • (3) 7 9 19 18 12 23 51 54 73
  • (4) 7 9 18 19 23 51 12 54 73
Correct Answer: (4) 7 9 18 19 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.

Question 32:

______ compares neighboring elements only and swaps them when necessary.

  • (1) Selection Sort
  • (2) Bubble Sort
  • (3) Insertion Sort
  • (4) Quick Sort
Correct Answer: (2) Bubble Sort
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.

Question 33:

______ are the unorganized facts that can be processed to generate meaningful information.

  • (1) Information
  • (2) Data
  • (3) Blog
  • (4) Contexts
Correct Answer: (2) Data
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.

Question 34:

______ is the positive square root of the average of squared differences of each value from the mean.

  • (1) Mode
  • (2) Variance
  • (3) Median
  • (4) Standard Deviation
Correct Answer: (4) Standard Deviation
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.

Question 35:

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:

  • (1) Range
  • (2) Mode
  • (3) Mean
  • (4) Median
Correct Answer: (1) Range
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.

Question 36:

What is the primary difference between a database and a file system?

  • (1) Databases are slower than file systems for retrieving data.
  • (2) Databases offer structured data and relationships, while file systems do not.
  • (3) File systems can support complex queries, unlike databases.
  • (4) Both databases and file systems handle data in the same way.
Correct Answer: (2) Databases offer structured data and relationships, while file systems do not.
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.

Question 37:

A domain in a relational database refers to:

  • (1) The overall database structure
  • (2) A specific set of valid values for an attribute
  • (3) A table containing multiple records
  • (4) A relationship between two tables
Correct Answer: (2) A specific set of valid values for an attribute
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.

Question 38:

A relation in a relational database is also known as:

  • (1) A data type
  • (2) An attribute
  • (3) A schema
  • (4) A table
Correct Answer: (4) A table
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.

Question 39:

The primary key is chosen from ________.

  • (1) The most complex candidate key available.
  • (2) All available candidate keys for a table.
  • (3) The simplest candidate key available.
  • (4) Any attribute within the table.
Correct Answer: (3) The simplest candidate key available.
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.

Question 40:

An alternate key is ________.

  • (1) Another name for the primary key
  • (2) A unique identifier besides the primary key
  • (3) A relationship between two tables
  • (4) A synonym for a tuple
Correct Answer: (2) A unique identifier besides the primary key.
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.

Question 41:

Consider the following SQL functions:

(A) CURDATE()
(B) CURRENT_DATE()
(C) CURRENT_DATE
(D) TODAY()

  • (1) (A), (B), and (D) only
  • (2) (A), (B), and (C) only
  • (3) (A), (B), (C) and (D)
  • (4) (B), (C), and (D) only
Correct Answer: (2) (A), (B), and (C) only
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()‘.

Question 42:

Which of the following is correct syntax for inserting foreign key constraint in a relation?

  • (1) ALTER TABLE table_name ADD FOREIGN KEY(attribute name) REFERENCES referenced_table_name(attribute name)
  • (2) ADD TABLE table_name ADD FOREIGN KEY(attribute name) REFERENCES referenced_table_name(attribute name)
  • (3) ALTER TABLE table_name REFERENCES referenced_table_name(attribute name) ADD FOREIGN KEY(attribute name)
  • (4) MODIFY TABLE table_name ADD FOREIGN KEY(attribute name) REFERENCES referenced_table_name(attribute name)
Correct Answer: (1) ALTER TABLE table_name ADD FOREIGN KEY(attribute name) REFERENCES referenced_table_name(attribute name)
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.

Question 43:

What is the result of the following arithmetic operation in SQL? SELECT 5 + NULL AS RESULT

  • (1) 5
  • (2) NULL
  • (3) 0
  • (4) 5NULL
Correct Answer: (2) NULL
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‘.

Question 44:

Which of the following expressions in SQL would calculate the square root of 16?

  • (1) POWER(16,2)
  • (2) POWER(16,0.5)
  • (3) POWER(16,1)
  • (4) MOD(16)
Correct Answer: (2) POWER(16,0.5)
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:

  • (1) (B) and (C) only
  • (2) (A), (B), and (C) only
  • (3) (C) and (D) only
  • (4) (A) and (B) only
Correct Answer: (1) (B) and (C) only
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.

Question 46:

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.

  • (1) (A) - (IV), (B) - (III), (C) - (II), (D) - (I)
  • (2) (A) - (III), (B) - (II), (C) - (I), (D) - (IV)
  • (3) (A) - (III), (B) - (I), (C) - (IV), (D) - (II)
  • (4) (A) - (IV), (B) - (I), (C) - (III), (D) - (II)
Correct Answer: (4) (A) - (IV), (B) - (I), (C) - (III), (D) - (II)
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.

Quick Tip: Devices like bridges, repeaters, and gateways are key to managing network connections across different layers of communication.

Question 47:

What is the purpose of Domain Name System (DNS) Server in networking?

  • (1) To encrypt data during transmission.
  • (2) To convert domain names into IP addresses.
  • (3) To regulate network traffic flow.
  • (4) To establish a secure connection between devices.
Correct Answer: (2) To convert domain names into IP addresses.
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.

Question 48:

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?

  • (1) IP Address
  • (2) Web Address
  • (3) MAC Address
  • (4) Port Address
Correct Answer: (1) IP Address
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.

Question 49:

In a ______ topology, if there are n devices in a network, each device has (n-1) ports for cables.

  • (1) Mesh
  • (2) Bus
  • (3) Star
  • (4) Ring
Correct Answer: (1) Mesh
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.

Question 50:

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?

  • (1) (A), (B), (C), (D)
  • (2) (A), (B), (D), (C)
  • (3) (B), (A), (D), (C)
  • (4) (C), (B), (D), (A)
Correct Answer: (3) (B), (A), (D), (C)
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.


Fees Structure

Structure based on different categories

CategoriesState
General1750
sc1650

In case of any inaccuracy, Notify Us! 

Comments


No Comments To Show