CUET UG Computer Science2025 Question Paper (Available): Download Question Paper with Answer Key And Solutions PDF

Shivam Yadav's profile photo

Shivam Yadav

Educational Content Expert | Updated on - Sep 12, 2025

The CUET Computer Science exam in 2025 will be held from 13th May to 3rd June, with downloadable question paper, answer key, and solutions post-exam. It covers programming concepts, data structures, logic gates, networking, and database management.

Students must attempt 50 questions in 60 minutes. The paper carries 250 marks, with +5 for correct and –1 for incorrect responses.

CUET UG Computer Science 2025 Question Paper with Answer Key PDF

CUET UG Computer Science Question Paper with Solutions PDF Download PDF Check Solutions

CUET UG Computer Science 2025 Question Paper with Solutions


Question 1:

Identify the relational algebra operation denoted by:
\[ Course X Student; \]

where 'Course' and 'Student' are two relations and X is an operation.

  • (A) Union
  • (B) Set Difference
  • (C) Cartesian Product
  • (D) Intersection
Correct Answer: (C) Cartesian Product
View Solution

Step 1: Recall the symbol meaning.

In relational algebra, the operator \( \times \) (cross symbol) represents the Cartesian Product. This combines every tuple of the first relation with every tuple of the second relation.

Step 2: Why not the others?

Union (\(\cup\)) combines tuples from two relations, but requires the same schema (same attributes).
Set Difference (\(-\)) removes tuples of one relation from another, also requiring the same schema.
Intersection (\(\cap\)) gives common tuples of two relations, also requiring the same schema.
Cartesian Product (\(\times\)) does not require the same schema; it simply pairs all tuples.



Final Answer: \[ \boxed{Cartesian Product} \] Quick Tip: Remember: \( \times \) means Cartesian Product in relational algebra, while \( \cup \), \( - \), and \( \cap \) are set operators requiring the same schema.


Question 2:

Given the following relations:

TableA


TableB


Find \( TableA \cup TableB \).

Correct Answer: (1)
View Solution

Step 1: Recall union property.

The union of two relations includes all tuples that appear in either relation, but removes duplicates.

Step 2: Combine TableA and TableB.

From TableA: \[ \{(Anu, Dance), (Anuj, Music)\} \]

From TableB: \[ \{(Prannav, Reading), (Anuj, Music)\} \]

Step 3: Apply union and remove duplicates.

Combining both sets, we get: \[ \{(Anu, Dance), (Anuj, Music), (Prannav, Reading)\} \]

Notice that \((Anuj, Music)\) is duplicated, so it is kept only once.

Step 4: Match with options.

The correct table is:


Final Answer: \[ \boxed{Option 1 is the result of TableA \cup TableB} \] Quick Tip: In relational algebra, \(\cup\) keeps all unique tuples across both relations. Always check for duplicates and remove them in the final result.


Question 3:

Given two relations:

Employee with structure as (ID, Name, Address, Phone, Deptno)
Department with structure as (Deptno, Dname)

_____ is used to represent the relationship between two relations Employee and Department.

  • (A) Primary key
  • (B) Alternate key
  • (C) Foreign key
  • (D) Candidate key
Correct Answer: (3) Foreign key
View Solution

Step 1: Recall the concept.

A foreign key is an attribute in one relation that refers to the primary key of another relation. It establishes a link between two tables.

Step 2: Apply to given relations.

- In the Department relation, Deptno is the primary key.

- In the Employee relation, Deptno appears as an attribute.

- Here, Employee(Deptno) acts as a foreign key referring to Department(Deptno).

Step 3: Eliminate wrong options.

- Primary key: Uniquely identifies tuples in the same table, not across two relations.

- Alternate key: Candidate key not chosen as primary key.

- Candidate key: Attributes that can act as a primary key.


Final Answer: \[ \boxed{Foreign key is used to represent the relationship.} \] Quick Tip: Primary key = unique identifier in a table. Foreign key = reference to primary key in another table.


Question 4:

A _____ value is specified for the column, if no value is provided.

  • (A) unique
  • (B) null
  • (C) default
  • (D) primary
Correct Answer: (3) default
View Solution

Step 1: Recall concept of default value.

In SQL, when creating a table, a column can be given a DEFAULT value. If no explicit value is inserted, the column automatically takes the default value.

Step 2: Evaluate options.

- Unique: Constraint ensures all values in a column are distinct, not a fallback value.

- Null: Absence of value, not automatically assigned unless allowed.

- Default: A predefined value inserted when no value is given.

- Primary: Refers to primary key constraint, not applicable here.


Final Answer: \[ \boxed{Default value is specified if no value is provided.} \] Quick Tip: Always use DEFAULT for automatic values (e.g., DEFAULT 0 or DEFAULT 'Unknown') when no value is supplied.


Question 5:

Given table 'StudAtt' with structure as (Rno, Attdate, Attendance).
Identify the suitable command to add a primary key to the table after creation.

Note: We want to make both Rno and Attdate columns as primary key.

  • (A) ALTER TABLE StudAtt ADD PRIMARY KEY(Rno, Attdate);
  • (B) CREATE TABLE StudAtt ADD PRIMARY KEY(Rno);
  • (C) ALTER TABLE StudAtt ADD PRIMARY KEY;
  • (D) ALTER TABLE StudAtt ADD PRIMARY KEY(Rno) AND PRIMARY KEY(Attdate);
Correct Answer: (1) ALTER TABLE StudAtt ADD PRIMARY KEY(Rno, Attdate);
View Solution

Step 1: Recall composite key.

A composite primary key consists of two or more attributes together uniquely identifying a row.

Step 2: Apply to given table.

Here, both Rno (Roll number) and Attdate (Attendance Date) together uniquely identify a record. So, we need a composite primary key.

Step 3: Evaluate options.

- Option 1: Correct syntax to add a composite primary key.

- Option 2: Incorrect, CREATE TABLE cannot be used after creation, also only Rno included.

- Option 3: Incorrect, syntax incomplete.

- Option 4: Incorrect, a table can have only one primary key, not multiple separate ones.


Final Answer: \[ \boxed{ALTER TABLE StudAtt ADD PRIMARY KEY(Rno, Attdate);} \] Quick Tip: Use composite primary key when no single column can uniquely identify a row, but a combination can.


Question 6:

The SELECT command when combined with DISTINCT clause is used to:

  • (A) returns records without repetition
  • (B) returns records with repetition
  • (C) returns all records with conditions
  • (D) returns all records without checking
Correct Answer: (1) returns records without repetition
View Solution

Step 1: Understanding DISTINCT.

The DISTINCT keyword in SQL ensures that duplicate records are eliminated from the result set. Only unique values are returned.

Step 2: Example.

Suppose a column has values: (10, 20, 10, 30).

SELECT DISTINCT column_name FROM table;


This will return: (10, 20, 30).

Step 3: Eliminate wrong options.

- Option 2: Incorrect, DISTINCT never returns duplicates.

- Option 3: Incorrect, conditions are applied using WHERE clause.

- Option 4: Incorrect, DISTINCT does check and removes duplicates.



Final Answer: \[ \boxed{Returns records without repetition} \] Quick Tip: Always use DISTINCT when you want to remove duplicates and retrieve only unique results in SQL queries.


Question 7:

__________________ is used to search for a specific pattern in a column.

  • (A) Between operator
  • (B) In operator
  • (C) Like operator
  • (D) Null operator
Correct Answer: (3) Like operator
View Solution

Step 1: Understanding pattern matching.

In SQL, to search for a specific pattern within text data, the LIKE operator is used along with wildcards.

Step 2: Wildcards with LIKE.

- % represents zero, one, or many characters.

- _ represents exactly one character.


Step 3: Example.
SELECT name FROM students WHERE name LIKE 'A%';

This will return all names starting with 'A'.

Step 4: Eliminate wrong options.

- Option 1: BETWEEN checks ranges, not patterns.

- Option 2: IN checks specific values, not patterns.

- Option 4: NULL operator checks for NULL values.



Final Answer: \[ \boxed{LIKE operator} \] Quick Tip: Use LIKE with % and _ wildcards to perform flexible string pattern searches in SQL.


Question 8:

Give the output of the query: SELECT MONTH("2010-03-05");

  • (A) 3
  • (B) 5
  • (C) MARCH
  • (D) MAY
Correct Answer: (1) 3
View Solution

Step 1: Understanding MONTH() function.

The SQL MONTH() function extracts the month part from a date value and returns it as a numeric integer (1–12).

Step 2: Apply to given date.

The date given is “2010-03-05”. Here:
- Year = 2010

- Month = 03

- Day = 05


Step 3: Extracting month.

MONTH("2010-03-05") = 3.

Step 4: Eliminate wrong options.

- Option 2: 5 is the day, not the month.

- Option 3: MARCH is textual format, but MONTH() gives numeric.

- Option 4: MAY corresponds to 5th month, not correct here.



Final Answer: \[ \boxed{3} \] Quick Tip: Remember: MONTH() returns a numeric value (1–12), while MONTHNAME() returns the name of the month (like MARCH).


Question 9:

Match List-I with List-II:

  • (A) (A)-(III), (B)-(I), (C)-(II), (D)-(IV)
  • (B) (A)-(I), (B)-(III), (C)-(II), (D)-(IV)
  • (C) (A)-(II), (B)-(III), (C)-(IV), (D)-(I)
  • (D) (A)-(III), (B)-(IV), (C)-(I), (D)-(II)
Correct Answer: (1) (A)-(III), (B)-(I), (C)-(II), (D)-(IV)
View Solution

Step 1: Understanding aggregate functions.

- count(marks) → Counts only non-null entries in the column “marks”. Corresponds to (III).

- count(*) → Counts all rows in the table, including those with NULL values. Corresponds to (I).

- avg(marks) → Calculates the average of all non-null values of “marks”. Corresponds to (II).

- sum(marks) → Returns the total sum of all non-null values of “marks”. Corresponds to (IV).


Step 2: Matching.

Therefore, the correct matching is:
(A) → (III), (B) → (I), (C) → (II), (D) → (IV).


Final Answer: \[ \boxed{Option (1)} \] Quick Tip: Remember: - COUNT(*) counts all rows. - COUNT(column) ignores NULL values. - AVG() and SUM() both ignore NULL values while performing calculations.


Question 10:

Given Relation: STUDENT

Find the value of: SELECT AVG(MARKS) FROM STUDENT;

  • (A) 30
  • (B) 22.5
  • (C) 90
  • (D) 23
Correct Answer: (1) 30
View Solution

Step 1: Understanding AVG function.

The AVG() function in SQL calculates the arithmetic mean of a column but it ignores NULL values.

Step 2: Identify valid values.

From the table: MARKS = 20, 40, NULL, 30.

Ignoring NULL → valid values = 20, 40, 30.

Step 3: Calculate average.
\[ Average = \frac{20 + 40 + 30}{3} = \frac{90}{3} = 30 \]

Step 4: Eliminate incorrect options.

- Option 2 (22.5): Wrong, as it assumes 4 rows (including NULL).

- Option 3 (90): Wrong, that is the sum, not average.

- Option 4 (23): Wrong, not a correct calculation.



Final Answer: \[ \boxed{30} \] Quick Tip: The AVG() function always ignores NULL values. To include NULLs as zero, you must use COALESCE or similar functions.


Question 11:

_____ operation is used to get the common tuples from two relations.

  • (A) Union
  • (B) Intersect
  • (C) Set Difference
  • (D) Cartesian product
Correct Answer: (2) Intersect
View Solution

Step 1: Recall set operations in relational algebra.

- Union: Combines all tuples from two relations (duplicates removed).

- Intersect: Returns only the common tuples between two relations.

- Set Difference: Returns tuples in one relation but not in the other.

- Cartesian Product: Returns all possible pairings of tuples from two relations.


Step 2: Apply definition.

Since the question asks for “common tuples,” the correct operation is Intersect.


Final Answer: \[ \boxed{Intersect} \] Quick Tip: In relational algebra: Union = combine, Intersect = common, Difference = exclusion, Cartesian Product = pairing.


Question 12:

Identify the correct IP address from the options given:

  • (A) FC:F8:AE:CE:7B:16
  • (B) 192.168.256.178
  • (C) 192.168.0.178
  • (D) 192.168.0.-1
Correct Answer: (3) 192.168.0.178
View Solution

Step 1: Rules for a valid IPv4 address.

- IPv4 has 4 octets separated by dots.

- Each octet must be in the range 0–255.


Step 2: Check each option.

- Option 1: FC:F8:AE:CE:7B:16 → This is a MAC address, not an IP. Invalid.

- Option 2: 192.168.256.178 → 256 exceeds 255, invalid.

- Option 3: 192.168.0.178 → All octets are within range (0–255), valid.

- Option 4: 192.168.0.-1 → Negative value is not allowed, invalid.



Final Answer: \[ \boxed{192.168.0.178} \] Quick Tip: Always check each octet of an IP address is within 0–255 and has no negative values.


Question 13:

Arrange the following Python code segments in order with respect to exception handling:

  • (A) except ZeroDivisionError:
    print("Zero denominator not allowed")
  • (B) finally:
    print("Over and Out")
  • (C) try:
    n = 50
    d = int(input("enter denominator"))
    q = n/d
    print("division performed")
  • (D) else:
    print("Result=", q)
  • (A) (C), (A), (B), (D)
  • (B) (C), (A), (D), (B)
  • (C) (B), (A), (D), (C)
  • (D) (C), (B), (D), (A)
Correct Answer: (2) (C), (A), (D), (B)
View Solution

Step 1: Recall Python exception handling structure.

The general structure is:


try:

# code

except Exception:

# error handling

else:

# executes if no error

finally:

# executes always


Step 2: Match given code blocks.

- (C) → try block (start).

- (A) → except block (error handling).

- (D) → else block (executes if no error).

- (B) → finally block (executes always).


Step 3: Correct order.

(C) → (A) → (D) → (B).


Final Answer: \[ \boxed{Option (2)} \] Quick Tip: In Python, the correct order of exception handling is: try → except → else → finally.


Question 14:

_____ is the process of transforming data or an object in memory (RAM) to a stream of bytes called byte streams.

  • (A) read()
  • (B) write()
  • (C) Pickling
  • (D) De-serialization
Correct Answer: (3) Pickling
View Solution

Step 1: Understanding Pickling.

In Python, Pickling is the process of serializing an object (like list, dictionary, class instance) into a byte stream so it can be saved to a file or transmitted.

Step 2: Opposite process.

The reverse process is called Unpickling (or de-serialization), where a byte stream is converted back into the original Python object.

Step 3: Eliminate wrong options.

- Option 1: read() → Reads data from a file, not serialization.

- Option 2: write() → Writes data, but does not serialize it.

- Option 4: De-serialization → This is the reverse process (unpickling).


Hence, the correct answer is Pickling.


Final Answer: \[ \boxed{Pickling} \] Quick Tip: Pickling = converting objects into byte streams. Unpickling = restoring objects from byte streams.


Question 15:

Identify the correct code to read data from the file notes.dat in a binary file:

  • (A) import pickle f1=open("notes.dat","r") data=pickle.load(f1) print(data) f1.close()
  • (B) import pickle f1=open("notes.dat","rb") data=f1.load() print(data) f1.close()
  • (C) import pickle f1=open("notes.dat","rb") data=pickle.load(f1) print(data) f1.close()
  • (D) import pickle f1=open("notes.dat","rb") data=f1.read() print(data) f1.close()
Correct Answer: (3)
View Solution

Step 1: Rules for reading binary files with Pickle.

- Binary files must be opened using mode "rb" (read binary).

- To read pickled data, use pickle.load(file_object).

Step 2: Checking each option.

- Option 1: Uses "r" instead of "rb". Wrong.

- Option 2: f1.load() is invalid because load() is from the pickle module, not a file method. Wrong.

- Option 3: Correct syntax → opens in binary read mode and uses pickle.load(f1).

- Option 4: Uses f1.read(), which reads raw bytes, not deserialized objects. Wrong.


Step 3: Correct code.


import pickle
f1=open("notes.dat","rb")
data=pickle.load(f1)
print(data)
f1.close()




Final Answer: \[ \boxed{Option (3)} \] Quick Tip: When working with Pickle:
- Always use "rb" to read binary files.
- Use pickle.load() to retrieve objects.
- Use pickle.dump() to save objects.


Question 16:

Identify the correct python statement to open a text file "data.txt" in both read and write mode.

  • (A) file.open("data.txt")
  • (B) file.open("data.txt","r+")
  • (C) file.open("data.txt","rw")
  • (D) file.open("data.txt","rw+")
Correct Answer: (2) file.open("data.txt","r+")
View Solution

Step 1: Understanding Python file modes.

- "r" → read only.

- "w" → write only (overwrites file).

- "r+" → read and write (file must exist).

- "w+" → write and read (creates new file if not exists, truncates existing).


Step 2: Check options.

- Option 1: Missing mode, defaults to "r" (read-only). Wrong.

- Option 2: "r+" is correct for read and write mode.

- Option 3: "rw" is not a valid mode in Python. Wrong.

- Option 4: "rw+" is also invalid in Python. Wrong.



Final Answer: \[ \boxed{file.open("data.txt","r+")} \] Quick Tip: Use "r+" for read+write, "w+" for write+read (new file), and "a+" for append+read in Python.


Question 17:

Identify the type of expression where operators are placed before the corresponding operands:

  • (A) Polish expression
  • (B) Infix expression
  • (C) Postfix expression
  • (D) Reverse polish expression
Correct Answer: (1) Polish expression
View Solution

Step 1: Types of expressions.

- Infix: Operator between operands (A + B).

- Postfix (Reverse Polish): Operator after operands (A B +).

- Prefix (Polish): Operator before operands (+ A B).


Step 2: Match with question.

The question asks where operators are placed before operands. This is Prefix (Polish expression).


Final Answer: \[ \boxed{Polish expression} \] Quick Tip: Remember: Prefix = Polish, Postfix = Reverse Polish, Infix = standard notation.


Question 18:

Evaluate the postfix expression: \[ 24 \; 5 \; 7 \; * \; 5 \; / \; + \]

  • (A) 29
  • (B) 30
  • (C) 31
  • (D) 0
Correct Answer: (3) 31
View Solution

Step 1: Recall rule of postfix evaluation.

Operands are pushed onto a stack. When an operator appears, the required number of operands are popped, operation performed, and result pushed back.

Step 2: Evaluate step by step.

Expression: 24 5 7 * 5 / +

- Push 24 → Stack = [24]

- Push 5 → Stack = [24, 5]

- Push 7 → Stack = [24, 5, 7]

- Operator * → 5 * 7 = 35 → Stack = [24, 35]

- Push 5 → Stack = [24, 35, 5]

- Operator / → 35 / 5 = 7 → Stack = [24, 7]

- Operator + → 24 + 7 = 31 → Stack = [31]


Step 3: Final result.

Value = 31.


Final Answer: \[ \boxed{31} \] Quick Tip: For postfix evaluation: Push numbers, pop and compute on operators, repeat till end. Final stack value is the result.


Question 19:

STACK follows _____ principle, where insertion and deletion is from _____ end/ends only.

  • (A) LIFO, two
  • (B) FIFO, two
  • (C) FIFO, top
  • (D) LIFO, one
Correct Answer: (4) LIFO, one
View Solution

Step 1: Understanding stack principle.

A stack is a linear data structure that follows the LIFO (Last In, First Out) principle. This means the element inserted last is the first to be removed.

Step 2: Insertion and deletion operations.

Both insertion (PUSH) and deletion (POP) happen only at one end, called the top of the stack.

Step 3: Eliminate wrong options.

- Option 1: LIFO, two → Wrong, operations occur only at one end.

- Option 2: FIFO, two → Wrong, FIFO describes queues, not stacks.

- Option 3: FIFO, top → Wrong, mixing queue property with stack position.

- Option 4: LIFO, one → Correct, as stack works on LIFO and one-end operation.



Final Answer: \[ \boxed{LIFO, one} \] Quick Tip: Remember: Stack → LIFO (push and pop from top). Queue → FIFO (enqueue at rear, dequeue from front).


Question 20:

Given a scenario:
Suppose there is a web-server hosting a website to declare results. This server can handle a maximum of 100 concurrent requests to view results. So, as to serve thousands of user requests, a _____ would be the most appropriate data structure to use.

  • (A) Stack
  • (B) Queue
  • (C) List
  • (D) Dictionary
Correct Answer: (2) Queue
View Solution

Step 1: Understand the problem.

A web server receives thousands of requests, but it can only process a limited number (100 in this case) at a time. Other requests must wait in line.

Step 2: Properties of data structures.

- Stack: LIFO structure, unsuitable for fair processing of multiple requests.

- Queue: FIFO structure, ensures requests are handled in the order they arrive.

- List: General collection, but no enforced order for processing requests.

- Dictionary: Key-value mapping, not suitable for request scheduling.


Step 3: Best fit.

Since requests must be processed in arrival order, a Queue is the most appropriate data structure.


Final Answer: \[ \boxed{Queue} \] Quick Tip: Use Queue (FIFO) for scheduling requests in web servers, operating systems, and printer jobs where fairness/order is needed.


Question 21:

To perform enqueue and dequeue efficiently on a queue, which of the following operations are required?

A) isEmpty

B) peek

C) isFull

D) update

  • (A) (A), (B) and (D) only
  • (B) (A), (B) and (C) only
  • (C) (B), (C) and (D) only
  • (D) (A), (C) and (D) only
Correct Answer: (2) (A), (B) and (C) only
View Solution

Step 1: Understanding queue operations.

- isEmpty: Needed to check if the queue is empty before performing dequeue.

- peek: Allows viewing the front element without removing it. Useful for efficiency.

- isFull: Required to check if the queue is full before performing enqueue (important in circular queues).

- update: Not a standard queue operation.

Step 2: Eliminate wrong choices.

Since isEmpty, peek, and isFull are required, correct set is (A), (B), (C).


Final Answer: \[ \boxed{(A), (B) and (C) only} \] Quick Tip: For queues: Enqueue requires isFull check, Dequeue requires isEmpty check, and Peek helps to view the next element.


Question 22:

Identify the correct place where we have to use repeaters.

  • (A) Between A to B
  • (B) Between A to C
  • (C) Between A to D
  • (D) Between A to E
Correct Answer: (3) Between A to D
View Solution

Step 1: Rule of repeaters.

In Ethernet (10Base-T/100Base-T), the maximum cable length without using repeaters is typically 100 meters.

Step 2: Check distances.

- A to B = 20m → Less than 100m → No repeater needed.

- A to C = 50m → Less than 100m → No repeater needed.

- A to D = 110m → Greater than 100m → Repeater required.

- A to E = 70m → Less than 100m → No repeater needed.



Final Answer: \[ \boxed{Between A to D} \] Quick Tip: Repeaters are network devices used to regenerate signals when cable length exceeds the maximum transmission distance.


Question 23:

In MAC address, Organisational Unique Identifier (OUI) consists of _____.

  • (A) 32 bits
  • (B) 48 bits
  • (C) 24 bits
  • (D) 64 bits
Correct Answer: (3) 24 bits
View Solution

Step 1: Structure of MAC address.

- A MAC address is 48 bits (6 bytes) long.

- It is divided into two parts:
- OUI (Organisationally Unique Identifier): First 24 bits (first 3 bytes).

- NIC specific part: Last 24 bits (last 3 bytes).


Step 2: Correct answer.

Thus, OUI = 24 bits.


Final Answer: \[ \boxed{24 bits} \] Quick Tip: MAC address = 48 bits → First 24 bits (OUI: manufacturer code), Last 24 bits (NIC-specific).


Question 24:

Given a list numList of n elements and key value K, arrange the following steps for finding the position of the key K in the numList using binary search algorithm i.e. BinarySearch(numList, key).

  • (A) Calculate mid = (first + last) // 2
  • (B) SET first = 0, last = n - 1
  • (C) PRINT "Search unsuccessful"
  • (D) WHILE first <= last REPEAT
    IF numList[mid] = key
    PRINT "Element found at position", mid+1
    STOP
    ELSE
    IF numList[mid] > key, THEN last = mid - 1
    ELSE first = mid + 1
  • (A) (A), (B), (D), (C)
  • (B) (D), (B), (A), (C)
  • (C) (B), (A), (D), (C)
  • (D) (D), (A), (B), (C)
Correct Answer: (3) (B), (A), (D), (C)
View Solution

Step 1: Initialization.

Binary search begins by setting search boundaries: first = 0, last = n-1. → (B).

Step 2: Mid calculation.

Compute the middle index: mid = (first + last) // 2. → (A).

Step 3: Loop until element is found or list exhausted.

Repeat while first <= last: compare key with numList[mid]. If equal, found. If smaller, move left (last = mid - 1), else move right (first = mid + 1). → (D).

Step 4: Failure case.

If loop exits without finding element, print unsuccessful search. → (C).


Final Answer: \[ \boxed{(B), (A), (D), (C)} \] Quick Tip: Binary search steps: Initialize → Calculate mid → Compare in loop → Print unsuccessful if not found.


Question 25:

In binary search, after every pass of the algorithm, the search area:

  • (A) gets doubled
  • (B) gets reduced by half
  • (C) remains same
  • (D) gets reduced by one third
Correct Answer: (2) gets reduced by half
View Solution

Step 1: Recall binary search mechanism.

In binary search, the array is divided into two halves at each iteration using mid index.

Step 2: Progress of search.

At each pass, either the left half or the right half is discarded, reducing the search space by 50%.

Step 3: Efficiency.

This logarithmic halving of search space makes binary search efficient with time complexity \(\mathcal{O}(\log n)\).

Step 4: Eliminate wrong options.

- Option 1: Wrong, size never increases.

- Option 3: Wrong, search space reduces each step.

- Option 4: Wrong, reduction is by half not one third.



Final Answer: \[ \boxed{Gets reduced by half} \] Quick Tip: Each iteration of binary search halves the problem size, making it logarithmic in time complexity.


Question 26:

For binary search, the list is in ascending order and the key is present in the list. If the middle element is less than the key, it means:

  • (A) The key is in the first half.
  • (B) The key is in the second half.
  • (C) The key is not in the list.
  • (D) The key is the middle element.
Correct Answer: (2) The key is in the second half
View Solution

Step 1: Binary search condition.

If the list is sorted in ascending order, the binary search compares the key with the middle element.

Step 2: Case analysis.

- If mid_element == key, key found at mid.

- If mid_element > key, key must be in the left half.

- If mid_element < key, key must be in the right half (second half).


Step 3: Apply condition.

Since middle element < key, the key lies in the second half.


Final Answer: \[ \boxed{The key is in the second half} \] Quick Tip: Binary search halves the search space: if mid < key → go right; if mid > key → go left.


Question 27:

Arrange the following in order related to bubble sort for a list of elements:

Initial list: \[4, -9, 12, 30, 2, 6\]

  • (A) \[4, -9, 12, 30, 2, 6\]
  • (B) \[-9, 4, 12, 30, 2, 6\]
  • (C) \[-9, 4, 12, 2, 30, 6\]
  • (D) \[-9, 4, 12, 2, 6, 30\]
  • (A) (A), (B), (D), (C)
  • (B) (A), (C), (B), (D)
  • (C) (B), (A), (D), (C)
  • (D) (C), (B), (D), (A)
Correct Answer: (1) (A), (B), (D), (C)
View Solution

Step 1: Bubble sort principle.

In bubble sort, the largest element bubbles to the last position after each pass by successive swaps.

Step 2: Trace passes.

- Start (A): \[4, -9, 12, 30, 2, 6\]

- Pass 1: Swap 4 and -9 → (B): \[-9, 4, 12, 30, 2, 6\]

- Next swaps move 2 and 6 before 30 → (D): \[-9, 4, 12, 2, 6, 30\]

- Then bubble sort continues and swaps 2 with 12 → (C): \[-9, 4, 12, 2, 30, 6\] (intermediate).

Step 3: Correct sequence.

Hence correct ordering is: (A) → (B) → (D) → (C).


Final Answer: \[ \boxed{(A), (B), (D), (C)} \] Quick Tip: In bubble sort, the largest element is placed at the end of the list after each pass.


Question 28:

The amount of time an algorithm takes to process a given data can be called its:

  • (A) Process time
  • (B) Time period
  • (C) Time complexity
  • (D) Time bound
Correct Answer: (3) Time complexity
View Solution

Step 1: Definition.

Time complexity refers to the computational complexity that describes the amount of time it takes to run an algorithm as a function of the size of the input.

Step 2: Differentiate from other terms.

- Process time: Generic term, not a formal measure.

- Time period: Refers to cycles in physics/electronics, not algorithms.

- Time bound: Relates to deadlines, not algorithm analysis.


Step 3: Correct terminology.

The correct term is Time Complexity.


Final Answer: \[ \boxed{Time Complexity} \] Quick Tip: Time complexity is usually expressed using Big-O notation (e.g., \(O(n), O(\log n)\)).


Question 29:

Identify the incorrect statement in the context of measures of variability:

  • (A) Range is the difference between maximum and minimum values of the data.
  • (B) Mean is the average of numeric values of an attribute.
  • (C) Standard deviation refers to differences within the set of data of a variable.
  • (D) Measures of variability is also known as measures of dispersion.
Correct Answer: (2) Mean is the average of numeric values of an attribute.
View Solution

Step 1: Recall definitions.

- Range: Difference between maximum and minimum values → Correct.

- Mean: Represents central tendency, not a measure of variability → Incorrect.

- Standard Deviation: Measures how data points differ from the mean (a measure of variability) → Correct.

- Variability/Dispersion: Both terms refer to spread of data → Correct.


Step 2: Conclusion.

The incorrect statement is that Mean is a measure of variability. Mean is a measure of central tendency, not dispersion.


Final Answer: \[ \boxed{Mean is the average of numeric values of an attribute.} \] Quick Tip: Always distinguish between central tendency (Mean, Median, Mode) and variability (Range, Variance, Standard Deviation).


Question 30:

Identify type of data being collected/generated in the scenario of recording a video:

  • (A) Structured Data
  • (B) Ambiguous data
  • (C) Unstructured data
  • (D) Formal Data
Correct Answer: (3) Unstructured data
View Solution

Step 1: Understand structured vs unstructured data.

- Structured Data: Organized in rows and columns (e.g., databases, spreadsheets).

- Unstructured Data: Not organized in a predefined format (e.g., videos, images, audio).

- Ambiguous data: Not a standard category in data classification.

- Formal data: Not a recognized data type in this context.


Step 2: Apply to scenario.

Video recording produces raw media files with no tabular structure → Unstructured data.


Final Answer: \[ \boxed{Unstructured Data} \] Quick Tip: Videos, images, and audio are unstructured data. Databases and spreadsheets represent structured data.


Question 31:

Given data:
Weight of 20 students in kgs = [35, 35, 40, 40, 40, 50, 50, 50, 50, 50, 60, 65, 65, 70, 70, 72, 75, 75, 78, 78]

Find the mode.

  • (A) 50
  • (B) 55
  • (C) 57.4
  • (D) 57
Correct Answer: (1) 50
View Solution

Step 1: Definition of mode.

The mode is the value that appears most frequently in the data set.

Step 2: Count frequencies.

- 35 → 2 times

- 40 → 3 times

- 50 → 5 times

- 60 → 1 time

- 65 → 2 times

- 70 → 2 times

- 72 → 1 time

- 75 → 2 times

- 78 → 2 times


Step 3: Highest frequency.

The value 50 occurs 5 times, which is the highest frequency.


Final Answer: \[ \boxed{50} \] Quick Tip: Mean = average, Median = middle value, Mode = most frequent value.


Question 32:

Match List-I with List-II.

  • (A) (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
  • (B) (A) - (III), (B) - (I), (C) - (II), (D) - (IV)
  • (C) (A) - (I), (B) - (II), (C) - (IV), (D) - (III)
  • (D) (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Correct Answer: (2) (A) - (III), (B) - (I), (C) - (II), (D) - (IV)
View Solution

Step 1: Recall definitions.

- Primary key: Attribute used to uniquely identify each tuple → (III).

- Degree: Total number of attributes in a table → (I).

- Foreign key: Attribute used to relate two tables → (II).

- Constraint: Restriction on type of data allowed in a column → (IV).


Step 2: Matching.

So: (A) - (III), (B) - (I), (C) - (II), (D) - (IV).


Final Answer: \[ \boxed{(A)-(III), (B)-(I), (C)-(II), (D)-(IV)} \] Quick Tip: Primary key = unique identity, Foreign key = reference link, Degree = number of attributes, Constraint = restriction.


Question 33:

In SQL table, the set of values which a column can take in each row is called _____.

  • (A) Tuple
  • (B) Attribute
  • (C) Domain
  • (D) Relation
Correct Answer: (3) Domain
View Solution

Step 1: Recall SQL terms.

- Tuple: A single row in a relation.

- Attribute: A column in a relation.

- Domain: The set of all possible values that an attribute can take.

- Relation: A table itself.


Step 2: Apply definition.

The set of permissible values for a column (attribute) is its domain.


Final Answer: \[ \boxed{Domain} \] Quick Tip: In DBMS: Attribute = column, Tuple = row, Relation = table, Domain = set of allowed values for an attribute.


Question 34:

Which of the following is synonym for Meta-data?

  • (A) Data Dictionary
  • (B) Database Instance
  • (C) Database Schema
  • (D) Data Constraint
Correct Answer: (1) Data Dictionary
View Solution

Step 1: Understanding Meta-data.

Meta-data means "data about data". It provides information about the structure, storage, and properties of data, rather than the actual data itself.

Step 2: Analyze options.

- Data Dictionary: Stores definitions, structure, constraints, and relationships of data in the database → synonym for meta-data.

- Database Instance: Refers to the running copy of the database at a specific moment, not meta-data.

- Database Schema: Logical design/blueprint of the database, but not a synonym of meta-data.

- Data Constraint: Rules applied on data, not meta-data.


Step 3: Conclusion.

Thus, the synonym of meta-data is Data Dictionary.


Final Answer: \[ \boxed{Data Dictionary} \] Quick Tip: Meta-data = data about data. In DBMS, it is stored in the Data Dictionary.


Question 35:

Single row functions are also known as ____ functions.

  • (A) Multi row
  • (B) Group
  • (C) Mathematical
  • (D) Scalar
Correct Answer: (4) Scalar
View Solution

Step 1: Understanding single row functions.

Single row functions operate on a single row and return one value for each row processed. Examples include UPPER(), LOWER(), ROUND(), LENGTH(), etc.

Step 2: Check other types.

- Multi-row / Group functions: Operate on a set of rows and return a single result (e.g., SUM, AVG, COUNT).

- Mathematical: A category of functions, but not the general synonym.

- Scalar: Correct synonym, since they return one value per row.


Step 3: Conclusion.

Hence, single row functions are also known as Scalar functions.


Final Answer: \[ \boxed{Scalar Functions} \] Quick Tip: Remember: Single row functions = Scalar functions (work on each row individually). Multi-row functions = Aggregate functions (work on groups of rows).


Question 36:

Ms Ritika wants to delete the table 'sports' permanently. Help her in selecting the correct SQL command from the following.

  • (A) DELETE FROM SPORTS;
  • (B) DROP SPORTS;
  • (C) DROP TABLE SPORTS;
  • (D) DELETE * FROM SPORTS;
Correct Answer: (3) DROP TABLE SPORTS;
View Solution

Step 1: Differentiate between DELETE and DROP.

- DELETE: Removes rows (data) from a table but keeps the table structure intact.

- DROP TABLE: Permanently deletes both the data and the table structure from the database.


Step 2: Check each option.

- Option 1: Incorrect → Removes records, table remains.

- Option 2: Incorrect → Invalid SQL syntax, must use "DROP TABLE".

- Option 3: Correct → Permanently deletes the table.

- Option 4: Incorrect → Wrong syntax (DELETE * is not valid SQL).



Final Answer: \[ \boxed{DROP TABLE SPORTS;} \] Quick Tip: Use DELETE for removing rows, TRUNCATE for clearing all rows but keeping structure, and DROP TABLE for permanent deletion.


Question 37:

Which of the following are text functions?

  • (A) MID()
  • (B) INSTR()
  • (C) SUBSTR()
  • (D) LENGTH()
  • (A) (A), (B) and (D) only
  • (B) (A), (B) and (C) only
  • (C) (A), (B), (C) and (D)
  • (D) (B), (C) and (D) only
Correct Answer: (3) (A), (B), (C) and (D)
View Solution

Step 1: Recall definitions of text functions.

- MID(): Extracts substring from text (like SUBSTR).

- INSTR(): Returns the position of a substring within a string.

- SUBSTR(): Extracts part of a string.

- LENGTH(): Returns length of string.


Step 2: Conclusion.

All four functions (MID, INSTR, SUBSTR, LENGTH) are text/string functions.


Final Answer: \[ \boxed{(A), (B), (C) and (D)} \] Quick Tip: String functions include LENGTH(), UPPER(), LOWER(), SUBSTR(), INSTR(), etc. Useful for text manipulation.


Question 38:

Match List-I with List-II.

  • (A) (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
  • (B) (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
  • (C) (A) - (IV), (B) - (I), (C) - (II), (D) - (III)
  • (D) (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Correct Answer: (1) (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
View Solution

Step 1: Recall definitions.

- Router: A network device that forwards data packets between networks → (II).

- Ethernet Card: Also known as NIC (Network Interface Card) → (IV).

- Ring: A type of network topology → (I).

- PAN (Personal Area Network): A type of network (like LAN, MAN, WAN) → (III).


Step 2: Matching.

So: (A) - (II), (B) - (IV), (C) - (I), (D) - (III).


Final Answer: \[ \boxed{(A)-(II), (B)-(IV), (C)-(I), (D)-(III)} \] Quick Tip: Routers are devices, Ethernet card is NIC, Ring is a topology, PAN is a network type.


Question 39:

______ is a language used to design web pages.

  • (A) Web browser
  • (B) HTTP
  • (C) HTML
  • (D) WWW
Correct Answer: (3) HTML
View Solution

Step 1: Analyze each option.

- Web browser: A software application used to view web pages, not a language.

- HTTP (HyperText Transfer Protocol): A protocol used for data transfer, not for designing.

- HTML (HyperText Markup Language): A markup language used to design and structure web pages.

- WWW (World Wide Web): The global information system, not a design language.


Step 2: Correct choice.

Since HTML is the markup language used to design web pages, the correct answer is HTML.


Final Answer: \[ \boxed{HTML} \] Quick Tip: HTML provides structure to web pages, CSS adds style, and JavaScript adds interactivity.


Question 40:

Match List-I with List-II.

  • (A) (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
  • (B) (A) - (II), (B) - (I), (C) - (IV), (D) - (III)
  • (C) (A) - (I), (B) - (II), (C) - (IV), (D) - (III)
  • (D) (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
Correct Answer: (2) (A) - (II), (B) - (I), (C) - (IV), (D) - (III)
View Solution

Step 1: Recall definitions.

- Modem: Modulator-Demodulator → (II).

- RJ45: An 8-pin connector used with Ethernet cables → (I).

- Network Interface Unit: Refers to Ethernet card (NIC) → (IV).

- ISP (Internet Service Provider): Provides internet access → (III).


Step 2: Matching.

So: (A) - (II), (B) - (I), (C) - (IV), (D) - (III).


Final Answer: \[ \boxed{(A)-(II), (B)-(I), (C)-(IV), (D)-(III)} \] Quick Tip: Remember: Modem = Modulator-Demodulator, RJ45 = Connector, NIU = Ethernet card, ISP = Internet provider.


Question 41:

Bandwidth of a channel is:

  • (A) The range of frequencies available for transmission of data through that channel.
  • (B) The path of message travels between source and destination.
  • (C) The set of rules on the Internet.
  • (D) The data or information that needs to be exchanged.
Correct Answer: (1) The range of frequencies available for transmission of data through that channel.
View Solution

Step 1: Understanding bandwidth.

Bandwidth refers to the difference between the highest and lowest frequencies that a channel can use to transmit data. It determines the channel's data-carrying capacity.

Step 2: Evaluate options.

- Option 1: Correct → Bandwidth is indeed the range of available frequencies.

- Option 2: Incorrect → This describes a communication path, not bandwidth.

- Option 3: Incorrect → Rules on the Internet are protocols, not bandwidth.

- Option 4: Incorrect → This describes the message/data, not channel capacity.



Final Answer: \[ \boxed{Bandwidth = Range of frequencies available for transmission.} \] Quick Tip: Higher bandwidth means higher data transfer capacity. For example, a 100 Mbps channel can carry more data than a 10 Mbps channel.


Question 42:

Data Transfer Rate 1 Gbps is equal to:

  • (A) 1024 Mbps
  • (B) 1024 Kbps
  • (C) \(2^{30}\) bps
  • (D) \(2^{20}\) bps
  • (A) (A) and (D) only
  • (B) (A) and (C) only
  • (C) (B) and (D) only
  • (D) (B) and (C) only
Correct Answer: (2) (A) and (C) only
View Solution

Step 1: Recall unit conversions.

- 1 Gbps = \(10^9\) bits per second.

- 1 Mbps = \(10^6\) bits per second.

So, 1 Gbps = 1000 Mbps. But in binary conversion (computer terms), 1 Gbps ≈ 1024 Mbps.

Step 2: Binary representation.

- 1 Gbps = \(2^{30}\) bps (approx.)

- \(2^{20}\) bps = 1 Mbps, so \(2^{30}\) bps = 1 Gbps.

Step 3: Check options.

- (A) 1024 Mbps → Correct.

- (B) 1024 Kbps → Wrong (1024 Kbps = 1 Mbps, much smaller).

- (C) \(2^{30}\) bps → Correct.

- (D) \(2^{20}\) bps → Wrong, this equals 1 Mbps.



Final Answer: \[ \boxed{(A) and (C)} \] Quick Tip: Remember: \(2^{10} = 1024\). So \(2^{20}\) = 1 Mbps, \(2^{30}\) = 1 Gbps.


Question 43:

Identify the wired transmission media for the following:
“They are less expensive and commonly used in telephone lines and LANs. These cables are of two types: Unshielded and shielded.”

  • (A) Optical Fibre
  • (B) Coaxial Cable
  • (C) Twisted pair cable
  • (D) Microwaves
Correct Answer: (3) Twisted pair cable
View Solution

Step 1: Analyze the description.

- "Less expensive and commonly used in telephone lines and LANs" → refers to twisted pair cables.

- They are available as Unshielded Twisted Pair (UTP) and Shielded Twisted Pair (STP).

Step 2: Evaluate options.

- Optical Fibre: Expensive, high-speed, long distance, not telephone/LAN basic usage.

- Coaxial Cable: Used for cable TV and broadband, not primarily for LAN telephony.

- Twisted pair cable: Correct → used in LANs and telephone lines, UTP/STP types.

- Microwaves: Wireless medium, not wired.



Final Answer: \[ \boxed{Twisted pair cable} \] Quick Tip: Twisted pair cables are cheap and widely used. UTP is most common in LAN connections, while STP provides better noise resistance.


Question 44:

The term Cookie is defined as:

  • (A) A computer cookie is a small file or data packet which is stored by a website on the server's computer.
  • (B) A cookie is edited only by the website that created it, the client’s computer acts as a host to store the cookie.
  • (C) Cookies are used by the user to store data on the computer.
  • (D) A cookie is a security system to protect your data.
Correct Answer: (2) A cookie is edited only by the website that created it, the client’s computer acts as a host to store the cookie.
View Solution

Step 1: Definition of cookie.

A cookie is a small text file stored on the client’s computer by the web browser at the request of a website. It helps the website remember user preferences, login sessions, or other small pieces of data.

Step 2: Analyze options.

- Option 1: Incorrect → The cookie is stored on the client’s computer, not the server’s.

- Option 2: Correct → Only the website that set the cookie can read/modify it, and it is stored on the client system.

- Option 3: Incorrect → Cookies are not created manually by users; they are generated by websites.

- Option 4: Incorrect → Cookies are not security systems, though they may store authentication tokens.


Step 3: Clarification.

Cookies improve user experience by remembering session states, shopping carts, and preferences. They are not inherently secure, and misuse can lead to privacy issues.


Final Answer: \[ \boxed{Cookies are stored on the client machine and only editable by the site that created them.} \] Quick Tip: Session cookies are temporary and expire when the browser closes, while persistent cookies remain stored until their expiry time.


Question 45:

Identify the concept behind the below-given scenario:
“If an attacker limits or stops an authorized user to access a service, device or any such resource by overloading that resource with illegitimate requests.”

  • (A) Snooping
  • (B) Eavesdropping
  • (C) Denial of Service
  • (D) Plagiarism
Correct Answer: (3) Denial of Service
View Solution

Step 1: Definition of Denial of Service (DoS).

A DoS attack occurs when attackers flood a server, network, or service with excessive requests, exhausting its resources, and making it unavailable to legitimate users.

Step 2: Analyze options.

- Option 1: Snooping → Refers to unauthorized access to private data, not overloading services.

- Option 2: Eavesdropping → Refers to secretly listening to communication, not denying service.

- Option 3: Denial of Service → Correct → Overloading resources with illegitimate requests to prevent access.

- Option 4: Plagiarism → Irrelevant, refers to copying content.


Step 3: Clarification.

A more advanced form is Distributed Denial of Service (DDoS), where multiple compromised systems simultaneously attack a single target, making mitigation harder.


Final Answer: \[ \boxed{Denial of Service (DoS) attack} \] Quick Tip: Use firewalls, intrusion detection systems, and traffic filtering to reduce the impact of DoS/DDoS attacks.


Question 46:

The HTTPS based websites require:

  • (A) Search Engine Optimization
  • (B) Digital authenticity
  • (C) WWW Certificate
  • (D) SSL Digital Certificate
Correct Answer: (4) SSL Digital Certificate
View Solution

Step 1: Understanding HTTPS.

HTTPS (HyperText Transfer Protocol Secure) is the secure version of HTTP. It encrypts communication between client (browser) and server.

Step 2: Role of SSL.

To enable HTTPS, websites require an SSL/TLS certificate. This certificate provides encryption and authentication, ensuring secure data transfer.

Step 3: Evaluate options.

- Search Engine Optimization: Improves ranking but not required for HTTPS.

- Digital authenticity: A broad concept, not the technical requirement.

- WWW Certificate: No such specific certificate exists.

- SSL Digital Certificate: Correct, as it establishes HTTPS.



Final Answer: \[ \boxed{SSL Digital Certificate is required for HTTPS.} \] Quick Tip: SSL certificates enable HTTPS by encrypting communication, protecting against eavesdropping and data tampering.


Question 47:

State the output of the following query: \[ SELECT LENGTH(MID('INFORMATICS PRACTICES',5,-5)); \]

  • (A) NO OUTPUT
  • (B) 5
  • (C) 0
  • (D) ERROR
Correct Answer: (4) ERROR
View Solution

Step 1: Function understanding.

- MID(string, start, length) extracts a substring from string, starting at start, of size length.

- LENGTH(string) gives the number of characters in the string.

Step 2: Problem in query.

Here: MID('INFORMATICS PRACTICES', 5, -5).
The third argument (length) cannot be negative in SQL. Hence, this query is invalid.

Step 3: Conclusion.

Instead of producing a substring, the database will throw an error.


Final Answer: \[ \boxed{ERROR} \] Quick Tip: MID/ SUBSTR functions require a positive length. Negative values are not valid and cause errors.


Question 48:

Match List-I with List-II:

  • (A) (A) - (III), (B) - (IV), (C) - (II), (D) - (I)
  • (B) (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
  • (C) (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
  • (D) (A) - (III), (B) - (IV), (C) - (II), (D) - (I)
Correct Answer: (1) (A) - (III), (B) - (IV), (C) - (II), (D) - (I)
View Solution

Step 1: Recall functions.

- group by: Used with having clause to group rows → (III).

- mid(): A string function that extracts a substring → (IV) text function.

- count(): An aggregate function used to count rows/values → (II).

- mod(): A mathematical function that returns the remainder → (I).


Step 2: Match correctly.

(A) - (III), (B) - (IV), (C) - (II), (D) - (I).


Final Answer: \[ \boxed{(A)-(III), (B)-(IV), (C)-(II), (D)-(I)} \] Quick Tip: Remember: \(\textbf{Aggregate functions}\) summarize data (COUNT, SUM), \(\textbf{text functions}\) work on strings (MID), and \(\textbf{math functions}\) handle numbers (MOD).


Question 49:

What will be the format of the output of the NOW() function?

  • (A) HH:MM:SS
  • (B) YYYY-MM-DD HH:MM:SS
  • (C) HH:MM:SS YYYY-MM-DD
  • (D) YYYY-DD-MM HH:MM:SS
Correct Answer: (2) YYYY-MM-DD HH:MM:SS
View Solution

Step 1: Understanding NOW() function.

In SQL, the NOW() function returns the current date and time of the system where the query is executed.

Step 2: Output format.

The result is returned in a standard timestamp format: \[ YYYY-MM-DD HH:MM:SS \]

Step 3: Verify against options.

- Option 1: HH:MM:SS → only time, incomplete.

- Option 2: YYYY-MM-DD HH:MM:SS → correct full format.

- Option 3: HH:MM:SS YYYY-MM-DD → incorrect order.

- Option 4: YYYY-DD-MM HH:MM:SS → incorrect date format.



Final Answer: \[ \boxed{NOW() returns date and time in YYYY-MM-DD HH:MM:SS format.} \] Quick Tip: Use CURDATE() for only the date, and CURTIME() for only the time in SQL.


Question 50:

State the output of the following query: \[ SELECT ROUND(9873.567,-2); \]

  • (A) 9900
  • (B) 9873
  • (C) 9800
  • (D) 9873.5
Correct Answer: (3) 9800
View Solution

Step 1: Understanding ROUND().

The ROUND(number, n) function rounds a number to the nearest place value based on n.
- If n > 0: rounds to decimal places.

- If n = 0: rounds to nearest integer.

- If n < 0: rounds to the left of the decimal.


Step 2: Apply here.

- Number = 9873.567

- Parameter = -2 → round to nearest hundred.

- 9873.567 → the tens digit is 7 (≥ 5), so we round up.

\[ 9873.567 \approx 9800 \]

Step 3: Check options.

Correct value is 9800.


Final Answer: \[ \boxed{9800} \] Quick Tip: Negative values in ROUND() move rounding to the left of the decimal: -1 = nearest 10, -2 = nearest 100, -3 = nearest 1000.


Question 51:

Given the following table:

State the output of the following query:
SELECT COUNT(SALARY) FROM EMPLOYEE;

  • (A) 4
  • (B) 2
  • (C) 3
  • (D) 1
Correct Answer: (3) 3
View Solution

Step 1: Understanding COUNT(column).

The SQL COUNT(column) function counts only the non-NULL values in a column.

Step 2: Identify non-NULL salaries.

From the table: Salaries = 4000, NULL, 6000, 2000.

Valid non-NULL values = (C)

Step 3: Output.
\[ COUNT(SALARY) = 3 \]


Final Answer: \[ \boxed{3} \] Quick Tip: COUNT(*) counts all rows including NULLs, while COUNT(column) ignores NULL values.


Question 52:

Match List-I with List-II.

  • (A) (A)-(I), (B)-(II), (C)-(III), (D)-(IV)
  • (B) (A)-(II), (B)-(IV), (C)-(I), (D)-(III)
  • (C) (A)-(I), (B)-(II), (C)-(IV), (D)-(III)
  • (D) (A)-(III), (B)-(IV), (C)-(I), (D)-(II)
Correct Answer: (2) (A)-(II), (B)-(IV), (C)-(I), (D)-(III)
View Solution

Step 1: SUBSTR().

Used to extract a substring → (II).

Step 2: TRIM().

Removes spaces from both ends of a string → (IV).

Step 3: INSTR().

Finds the position of a substring → (I).

Step 4: LEFT().

Extracts characters from the left side of a string → (III).


Final Answer: \[ \boxed{(A)-(II), (B)-(IV), (C)-(I), (D)-(III)} \] Quick Tip: String functions help manipulate and analyze text: SUBSTR() extracts, INSTR() finds, TRIM() cleans, LEFT() extracts from the left.


Question 53:

Arrange the following statements to create a series from a dictionary.

  • (A) Print the series
  • (B) Import the pandas library
  • (C) Create the series
  • (D) Create a dictionary
  • (A) (A), (B), (C), (D)
  • (B) (A), (C), (B), (D)
  • (C) (B), (D), (C), (A)
  • (D) (C), (B), (D), (A)
Correct Answer: (3) (B), (D), (C), (A)
View Solution

Step 1: Import pandas.

Before creating any series, the pandas library must be imported. → (B).

Step 2: Create a dictionary.

The data must be prepared in dictionary form first. → (D).

Step 3: Create the series.

Use pd.Series(dictionary) to create a series. → (C).

Step 4: Print the series.

Finally, output the created series. → (A).


Final Answer: \[ \boxed{(B), (D), (C), (A)} \] Quick Tip: When working with pandas, always import the library first, prepare your data (list, dict, etc.), create the object, and then print or analyze it.


Question 54:

Given the following DataFrame df:

Select the correct commands from the following to display the last five rows:

  • (A) print(df.tail(-5))
  • (B) print(df.head(-5))
  • (C) print(df.tail())
  • (D) print(df.tail(5))
Correct Answer: (C) and (D) only
View Solution

Step 1: Recall DataFrame commands.

- df.tail() → returns the last 5 rows by default.

- df.tail(n) → returns the last \(n\) rows. So df.tail(5) also gives the last 5 rows.

Step 2: Evaluate given options.

- (A) df.tail(-5) → Invalid, negative values are not allowed.

- (B) df.head(-5) → Invalid, negative index not supported.

- (C) df.tail() → Correct, gives last 5 rows.

- (D) df.tail(5) → Correct, explicitly gives last 5 rows.


Step 3: Conclusion.

The correct commands are (C) and (D).


Final Answer: \[ \boxed{(C) and (D) only} \] Quick Tip: Use df.head(n) for first \(n\) rows and df.tail(n) for last \(n\) rows. Default \(n=5\).


Question 55:

Given the following series 'ser1':

State the output of the following command: print(ser1 >= 70)

Correct Answer: (2)
View Solution

Step 1: Recall comparison operation on Pandas Series.

When a relational operator (like >=) is applied on a Series, the output is a Boolean Series of the same size, where each element is True (T) or False (F) depending on the condition.

Step 2: Apply condition ser1 >= 70.

- Index 0 → 69 \(\geq\) 70? → False (F)

- Index 1 → 80 \(\geq\) 70? → True (T)

- Index 2 → 20 \(\geq\) 70? → False (F)

- Index 3 → 50 \(\geq\) 70? → False (F)

- Index 4 → 100 \(\geq\) 70? → True (T)

- Index 5 → 70 \(\geq\) 70? → True (T)


Step 3: Construct Boolean Series.

The result is:

Final Answer: \[ \boxed{Option (2)} \] Quick Tip: Remember: Relational operations on Pandas Series return Boolean Series. To filter values, use Boolean indexing like ser1[ser1 >= 70].


Question 56:

Which of the following are the correct commands to delete a column from the DataFrame df1?

(A) df1 = df1.drop(column_name, axis=1)
(B) df1.drop(column_name, axis=columns, inplace=True)
(C) df1.drop(column_name, axis='columns', inplace=True)
(D) df1.drop(column_name, axis=1, inplace=True)

Choose the \(\textbf{correct}\) answer from the options given below:
  • (A) (A), (C) and (D) only
  • (B) (A), (B) and (C) only
  • (C) (A), (B), (C) and (D)
  • (D) (B), (C) and (D) only
Correct Answer: (1) (A), (C) and (D) only
View Solution

Step 1: Recall how to delete a column in Pandas.

The drop() method is used to remove rows or columns from a DataFrame.
- To delete a column, we set axis=1 (or equivalently, axis='columns').
- The parameter inplace=True modifies the DataFrame directly; otherwise, a new DataFrame is returned.

Step 2: Check each option.

- Option (A): df1 = df1.drop(column_name, axis=1) → Correct. It drops the column and reassigns the DataFrame.

- Option (B): df1.drop(column_name, axis=columns, inplace=True) → Incorrect. axis=columns is not valid syntax (should be string 'columns').

- Option (C): df1.drop(column_name, axis='columns', inplace=True) → Correct. This is equivalent to axis=1.

- Option (D): df1.drop(column_name, axis=1, inplace=True) → Correct. Drops the column directly with inplace modification.


Step 3: Conclusion.

The correct commands are (A), (C), and (D).


Final Answer: \[ \boxed{Option (1): (A), (C), and (D) only} \] Quick Tip: Remember: For dropping a column in Pandas, use axis=1 or axis='columns'. If you want permanent changes, use inplace=True, otherwise assign the result back to the DataFrame.


Question 57:

Which of the following is the correct command to display the top 2 records of Series tail?

  • (A) print(s1.head(2))
  • (B) print(tail.head())
  • (C) print(tail.head(0))
  • (D) print(tail.head(2))
Correct Answer: (4) print(tail.head(2))
View Solution

Step 1: Recall head() function.

Series.head(n) returns the first \(n\) rows of a Series.

Default \(n=5\), but user can specify any number.

Step 2: Evaluate options.

- (1) Incorrect → refers to Series s1, not tail.

- (2) Incorrect → no number specified, gives first 5 rows.

- (3) Incorrect → head(0) returns empty Series.

- (4) Correct → tail.head(2) displays first 2 rows of Series tail.

Step 3: Conclusion.

Only option (4) is valid.


Final Answer: \[ \boxed{print(tail.head(2))} \] Quick Tip: Use head(n) to get first \(n\) rows and tail(n) to get last \(n\) rows of a Series/DataFrame.


Question 58:

While transferring the data from a DataFrame to a CSV file, if we do not want the column names to be saved to the file on disk, the parameter to be used in to_csv() is _____.

  • (A) header=False
  • (B) index=False
  • (C) header=True
  • (D) index=True
Correct Answer: (1) header=False
View Solution

Step 1: Recall DataFrame.to_csv().

- header=True (default) → writes column names to file.

- header=False → prevents writing column names.

- index=True (default) → writes index.

- index=False → avoids writing index.

Step 2: Match requirement.

Since the question asks to not save column names → we use header=False.


Final Answer: \[ \boxed{header=False} \] Quick Tip: Use header=False to suppress column names and index=False to suppress row indices in CSV export.


Question 59:

HTTP is .............

  • (A) a set of rules for email communication.
  • (B) a file transfer protocol.
  • (C) a set of rules which is used to retrieve linked web pages across the web.
  • (D) a set of rules used for secure transmission of data.
Correct Answer: (3) a set of rules which is used to retrieve linked web pages across the web
View Solution

Step 1: Understanding HTTP.

HTTP stands for HyperText Transfer Protocol. It is the foundation of data communication for the World Wide Web.

Step 2: Role of HTTP.

It defines how messages are formatted and transmitted, and how web servers and browsers should respond to commands.
For example, when a user enters a URL, the browser sends an HTTP request to the web server, and the server responds with the requested web page.

Step 3: Elimination of incorrect options.

- Option 1 is incorrect because email communication uses SMTP, IMAP, or POP3, not HTTP.

- Option 2 is incorrect because a file transfer protocol is FTP, not HTTP.

- Option 4 is incorrect because secure transmission uses HTTPS, which is HTTP + SSL/TLS encryption.


Step 4: Conclusion.

Therefore, the correct definition is Option 3: HTTP is a set of rules used to retrieve linked web pages across the web.


Final Answer: \[ \boxed{HTTP is used to transfer and retrieve hypertext-linked web resources.} \] Quick Tip: Remember: HTTP = unsecured protocol for web browsing, while HTTPS = secure protocol with SSL/TLS.


Question 60:

Put the following statistical measures in order starting from the simplest measure of data to the most complex one that describes data spread:

  • (A) Mode,
    (B) Mean,
    (C) Median,
    (D) Range,
    (E) Standard Deviation
  • (A) (A), (C), (B), (D), (E)
  • (B) (A), (B), (C), (D), (E)
  • (C) (B), (A), (D), (E), (C)
  • (D) (C), (E), (B), (D), (A)
Correct Answer: (2) (A), (B), (C), (D), (E)
View Solution

Step 1: Understanding each measure.

- Mode: The most frequent value in a dataset. Simplest measure.

- Mean: The average value of data. Slightly more complex.

- Median: The middle value when data is sorted. More robust than mean for skewed data.

- Range: Difference between maximum and minimum values. Describes spread in a simple way.

- Standard Deviation: Measures how much data deviates from the mean. Most complex spread measure.


Step 2: Ordering them.

From simplest to most complex:
(A) Mode \(\rightarrow\) (B) Mean \(\rightarrow\) (C) Median \(\rightarrow\) (D) Range \(\rightarrow\) (E) Standard Deviation.

Step 3: Verification with options.

Option 2 exactly matches this order.


Final Answer: \[ \boxed{(A), (B), (C), (D), (E)} \] Quick Tip: When studying statistics: Mode is the simplest, then Mean, then Median. For spread: Range is simple, but Standard Deviation gives the most detailed insight.


Question 61:

Dataframe.quantile() is used to get the quartiles. The second quantile is known as ..............

  • (A) mode
  • (B) mean
  • (C) standard deviation
  • (D) median
Correct Answer: (4) median
View Solution

Step 1: Understanding quantiles

Quantiles divide the dataset into equal parts. The second quantile (Q2) corresponds to the 50th percentile.


Step 2: Identifying Q2

The 50th percentile is also known as the median, because it represents the middle value of ordered data.


Step 3: Eliminating incorrect options

- Mode is the most frequent value, not the second quantile.

- Mean is the arithmetic average, not the median.

- Standard deviation measures dispersion, not a quantile.

\[ \boxed{Therefore, the second quantile = Median.} \] Quick Tip: Always remember: Q2 = 50th percentile = Median.


Question 62:

Consider the given DataFrame 'df4':

We want the following output:

  • (A) print(df4.sum(numeric_only=True))
  • (B) print(df4.sum(numeric_only=False))
  • (C) print(df4.sum())
  • (D) print(df4.count(numeric_only=True))
Correct Answer: (2) print(df4.sum(numeric_only=False))
View Solution

Step 1: Behavior of sum()

- sum() adds up numeric values in each column.

- With numeric_only=True, only numeric columns are included.

- With numeric_only=False, both numeric and string columns are processed.


Step 2: String concatenation

The column "NAME" is of string type. When included in sum(), all names are concatenated:
\[ Name column = "MEENAREENATEENASHEENA" \]

Step 3: Numeric column sums

- PERIODIC: \(1+2+3+2=8\)

- ENG: \(40+60+80+90=270\)

- MATHS: \(60+30+60+20=170\)

- SCIENCE: \(80+10+40+70=200\)

\[ \boxed{Correct Output obtained only with numeric_only=False} \] Quick Tip: Use numeric only=False to include string concatenation along with numeric summation in Pandas.


Question 63:

The process of changing the structure of a DataFrame using function pivot() is known as .............

  • (A) Transpose
  • (B) Reindexing
  • (C) Resetting
  • (D) Reshaping
Correct Answer: (4) Reshaping
View Solution

Step 1: Understanding pivot()

- Pivot reorganizes the structure of a DataFrame by transforming data.

- It reshapes data by turning unique column values into new columns.


Step 2: Differentiating from other options

- Transpose: Only flips rows ↔ columns.

- Reindexing: Changes the row/column labels.

- Resetting: Resets the index of DataFrame.


Step 3: Correct interpretation
\[ pivot() = Reshaping the DataFrame \]
\[ \boxed{Correct Answer = Reshaping} \] Quick Tip: Pivot reshapes the DataFrame, while transpose only flips it. Don’t confuse these two.


Question 64:

After establishing the connection to fetch the data from the table of a database in SQL into a DataFrame, which of the following function will be used?

  • (A) pandas.read_sql_query()
  • (B) pandas.read_sql_table()
  • (C) pandas.read_sql_query_table()
  • (D) pandas.read_sql()
  • (A) (A), (B) and (D) only
  • (B) (A), (B) and (C) only
  • (C) (A), (B), (C) and (D)
  • (D) (B), (C) and (D) only
Correct Answer: (A)(A), (B) and (D) only
View Solution

Step 1: Understanding the functions in pandas for SQL.

Pandas provides multiple functions to fetch data from SQL into DataFrames:

pandas.read_sql_query(): Used when you want to run a SQL query string and get the result as a DataFrame.
pandas.read_sql_table(): Directly reads an entire SQL table into a DataFrame.
pandas.read_sql(): A flexible function that can take either a query or a table name as an argument.


Step 2: Checking validity of each option.

- Option (A): Correct. Commonly used for executing queries.

- Option (B): Correct. Used for fetching the entire table.

- Option (C): Incorrect. read_sql_query_table() does not exist in pandas.

- Option (D): Correct. A flexible option for both queries and tables.


Step 3: Conclusion.

Hence, correct functions are (A), (B) and (D).


Final Answer: \[ \boxed{(A), (B) and (D) only} \] Quick Tip: Remember: read_sql_query() → for queries, read_sql_table() → for full tables, and read_sql() → for both. Ignore non-existent functions like read_sql_query_table().


Question 65:

______ in matplotlib also known as correlation plot, because they show how two variables are related.

  • (A) Bar graph
  • (B) Pie chart
  • (C) Box plot
  • (D) Scatter plot
Correct Answer: (D) Scatter plot
View Solution

Step 1: Understanding correlation plots.

A correlation plot is a graphical method to show the relationship between two variables. If we want to see how variable \(X\) affects variable \(Y\), we need a plot that places both variables on axes.

Step 2: Evaluating options.

- Option 1: Bar graph – Used to compare categorical data, not correlation between variables.

- Option 2: Pie chart – Used to show proportion or percentage, not relationships.

- Option 3: Box plot – Used for distribution, spread, and outliers, not direct correlation.

- Option 4: Scatter plot – Places one variable on x-axis and the other on y-axis, showing correlation directly. Hence correct.


Step 3: Conclusion.

Scatter plots are correlation plots because they visually represent how two continuous variables are related (positive, negative, or no correlation).


Final Answer: \[ \boxed{Scatter plot} \] Quick Tip: Whenever you see “correlation plot,” think of \(\textbf{scatter plots}\) – they reveal patterns, positive/negative relationships, or absence of correlation between variables.


Question 66:

Given the following statement:
import matplotlib.pyplot as plt
'plt' in the above statement is .............. name.

  • (A) key
  • (B) alias
  • (C) variable
  • (D) function
Correct Answer: (B) alias
View Solution

Step 1: Understanding the import statement.

In Python, the import statement allows us to bring in libraries or modules into our script. When importing, you can assign a shorthand name (alias) to the module using as. This helps in reducing the need to reference the entire module name repeatedly.

Step 2: Evaluate each option.

- Option (A) Key: In Python, a key usually refers to the key in a dictionary. This is not applicable here.
- Option (B) Alias: The plt in this case is the alias for the matplotlib.pyplot module, making this the correct answer.
- Option (C) Variable: A variable holds a value or object, which is not the case here.
- Option (D) Function: A function in Python is defined using the def keyword, which is not the case for plt.

Step 3: Conclusion.

The plt in the statement is an alias for the matplotlib.pyplot module.


Final Answer: \[ \boxed{plt is an alias for the matplotlib.pyplot module.} \] Quick Tip: The as keyword in Python is used to define an alias for imported modules. This helps shorten module names for ease of use.


Question 67:

How can you save a matplotlib plot as a file?

  • (A) plt.export()
  • (B) plt.save()
  • (C) plt.savefig()
  • (D) plt.store()
Correct Answer: (3) plt.savefig()
View Solution

Step 1: Understanding the task.

To save a plot as a file in matplotlib, the function savefig() is used. This function saves the current figure to a specified file format (e.g., PNG, PDF, SVG, etc.).

Step 2: Evaluate each option.

- Option (1) plt.export(): There is no function named export in matplotlib for saving figures.
- Option (2) plt.save(): This is not a valid function in matplotlib.
- Option (3) plt.savefig(): This is the correct function to save the plot. It saves the current figure to the specified file.
- Option (4) plt.store(): This is not a valid function in matplotlib.

Step 3: Conclusion.

The function savefig() is the correct way to save a matplotlib plot as a file.


Final Answer: \[ \boxed{Use plt.savefig() to save a plot as a file in matplotlib.} \] Quick Tip: You can specify the format when saving a figure using plt.savefig('filename.png'). If no format is specified, matplotlib will infer it from the file extension.


Question 68:

Arrange the following in order in the context of exception handling:

  • (A) Program Termination
  • (B) Exception is raised
  • (C) Error occurs in a program
  • (D) Catching an exception Choose the correct answer from the options given below:
  • (A) (C), (B), (D), (A)
  • (B) (A), (C), (B), (D)
  • (C) (B), (A), (C), (D)
  • (D) (C), (B), (A), (D)
Correct Answer: (1) (C), (B), (D), (A)
View Solution

Step 1: Understanding exception handling.

In exception handling, the flow typically starts when an error occurs, followed by the raising of an exception. If the exception is not caught, the program terminates. If caught, the exception is handled.

Step 2: Evaluate each option.

- Option (A) Program Termination: This happens at the end of the process if an exception is not caught.
- Option (B) Exception is raised: This occurs after the error is detected.
- Option (C) Error occurs in a program: This is the first step in the exception handling process.
- Option (D) Catching an exception: If an exception is raised, it must be caught by the exception handler.

Step 3: Correct order.

The correct order of operations is:
1. Error occurs (C).
2. Exception is raised (B).
3. Exception is caught (D).
4. Program terminates (A) if the exception is not handled.


Final Answer: \[ \boxed{The correct order is (C), (B), (D), (A).} \] Quick Tip: Remember, exception handling is designed to prevent abrupt program termination by catching exceptions and handling them gracefully.


Question 69:

The plot function of pandas matplotlib uses 'kind' argument which can accept a string indicating the type of graph to be plotted. Which of the following are valid plots?

  • (A) Area
  • (B) Box
  • (C) Scatter
  • (D) Line
Correct Answer: (1) (A), (B) and (D) only
View Solution

Step 1: Understanding the 'kind' argument.

In pandas, the plot function accepts a 'kind' argument which defines the type of plot to be drawn. The valid options for the 'kind' argument include types of plots such as 'line', 'scatter', 'bar', etc.

Step 2: Evaluate each option.

- Option (A) Area: A valid plot type, representing an area plot.
- Option (B) Box: A valid plot type for creating boxplots.
- Option (C) Scatter: This is a valid plot type, used for scatter plots.
- Option (D) Line: This is a valid plot type, used for line plots.

Step 3: Conclusion.

The valid plot types for the 'kind' argument are Area, Box, and Line, but not Scatter.


Final Answer: \[ \boxed{The valid plot types are Area, Box, and Line.} \] Quick Tip: The 'kind' argument in pandas can take values like 'line', 'bar', 'box', 'area', 'scatter', etc. Make sure to use the correct syntax.


Question 70:

Given the following code for histogram:

df.plot(kind='hist', edgecolor="Green", linewidth=2, linestyle='-', fill=False, hatch='o')

What is the role of fill=False?

  • (A) Each hist will be filled with green color.
  • (B) Each hist will be empty.
  • (C) Each hist will be filled with ':'.
  • (D) The edge color of each hist will be black.
Correct Answer: (2) Each hist will be empty.
View Solution

Step 1: Understanding the fill=False parameter.

In pandas, when plotting histograms, the fill parameter controls whether the bars are filled with color. Setting fill=False makes the histogram bars unfilled (empty).

Step 2: Evaluate each option.

- Option (1) Each hist will be filled with green color: This is incorrect. The fill=False parameter ensures the bars are not filled.
- Option (2) Each hist will be empty: This is the correct answer. With fill=False, the bars will have no fill, leaving them empty inside.
- Option (3) Each hist will be filled with ':': This is incorrect. The hatch parameter is used for patterns, not for filling with a specific character like ':'.
- Option (4) The edge color of each hist will be black: This is incorrect. The edge color is set to "Green" in the edgecolor argument, not black.

Step 3: Conclusion.

The fill=False parameter causes the histogram bars to be empty.


Final Answer: \[ \boxed{The fill=False parameter makes each histogram bar empty.} \] Quick Tip: When fill=False is used, the histogram bars will not be filled with color. You can use hatch to add patterns to the bars if needed.


Question 71:

Matplotlib library can be installed using pip command. Identify the correct syntax from the following options.

  • (A) pip install matplotlib.pyplot
  • (B) pip install matplotlib.pyplot
  • (C) pip install matplotlib.pyplot as plt
  • (D) pip install matplotlib
Correct Answer: (4) pip install matplotlib
View Solution

Step 1: Understanding the installation command.

The pip command is used to install Python libraries. The correct way to install matplotlib is to use the package name matplotlib.

Step 2: Evaluate each option.

- Option (1) pip install matplotlib.pyplot: This is incorrect. pyplot is a submodule of matplotlib, not a standalone package.
- Option (2) pip install matplotlib.pyplot: Again, this is incorrect for the same reason as option (1).
- Option (3) pip install matplotlib.pyplot as plt: This syntax is invalid in the context of installation. The as keyword is used in imports, not installations.
- Option (4) pip install matplotlib: This is the correct command to install the matplotlib library.

Step 3: Conclusion.

To install matplotlib, the correct command is pip install matplotlib.


Final Answer: \[ \boxed{pip install matplotlib is the correct command to install the library.} \] Quick Tip: Always use the correct package name in pip commands. For matplotlib, use pip install matplotlib.


Question 72:

Dynamic web pages can be created using various languages, like __________.

  • (A) JavaScript
  • (B) PHP
  • (C) Python
  • (D) Ruby
Correct Answer: (3) (A), (B), (C) and (D)
View Solution

Step 1: Understanding the languages used for dynamic web pages.

Dynamic web pages are created by using server-side or client-side languages that allow the page content to change based on user interactions or other factors.

Step 2: Evaluate each option.

- Option (A) JavaScript: JavaScript is used for creating dynamic content on the client-side.
- Option (B) PHP: PHP is a server-side language widely used to create dynamic web pages.
- Option (C) Python: Python, along with frameworks like Django and Flask, is used to create dynamic web pages on the server-side.
- Option (D) Ruby: Ruby, with the Ruby on Rails framework, is another server-side language used for creating dynamic web pages.

Step 3: Conclusion.

All of the listed languages (JavaScript, PHP, Python, and Ruby) are used for creating dynamic web pages.


Final Answer: \[ \boxed{All the given languages are used for creating dynamic web pages.} \] Quick Tip: Client-side languages like JavaScript work directly in the browser, while server-side languages like PHP, Python, and Ruby handle dynamic content generation on the server.


Question 73:

Match List-I with List-II:

List-I List-II
(A) STAR TOPOLOGY (I) Each communicating device is connected to a central node.
(B) LAN (II) Networking device.
(C) HUB (III) Protocol.
(D) VoIP (IV) Type of network.
  • Choose the correct answer from the options given below:
  • (A) (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
  • (B) (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
  • (C) (A) - (I), (B) - (C), (C) - (II), (D) - (IV)
  • (D) (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Correct Answer: (1) (A) - (I), (B) - (II), (C) - (III), (D) - (IV)
View Solution

Step 1: Understanding the terms.

- STAR TOPOLOGY (A): This refers to a network topology where each device is connected to a central hub or node.
- LAN (B): A Local Area Network (LAN) is a network of devices connected over a small geographical area, such as within a building.
- HUB (C): A hub is a networking device used to connect multiple devices in a network, especially in a star topology.
- VoIP (D): Voice over Internet Protocol (VoIP) is a technology used for voice communication over the internet.

Step 2: Match the items.

- (A) STAR TOPOLOGY matches with (I) Each communicating device is connected to a central node.
- (B) LAN matches with (II) Networking device, as it refers to a network.
- (C) HUB matches with (III) Protocol, as it is a networking device.
- (D) VoIP matches with (IV) Type of network, as it is a communication protocol.

Step 3: Conclusion.

The correct matching is:
(A) - (I), (B) - (II), (C) - (III), (D) - (IV).


Final Answer: \[ \boxed{The correct match is (A) - (I), (B) - (II), (C) - (III), (D) - (IV).} \] Quick Tip: In network topology, the star topology is common for LANs, and VoIP is a service built on protocols that facilitate internet-based voice communication.


Question 74:

Arrange the following in sequence of execution:

  • (A) HTTP Request
  • (B) Calls an application in response to the HTTP request
  • (C) Program executes and produces HTML output
  • (D) HTTP Response
Correct Answer: (1) (B), (A), (C), (D)
View Solution

Step 1: Understanding the sequence of execution.

In a typical web application, the sequence begins when the HTTP request is made. The server processes this request, executes the necessary program to generate the response, and then returns an HTTP response.

Step 2: Evaluate the sequence.

- (B) Calls an application in response to the HTTP request: This is the first step when a server responds to an incoming request.
- (A) HTTP Request: This is the request initiated by the client (browser).
- (C) Program executes and produces HTML output: After the HTTP request, the server processes the program to produce HTML content.
- (D) HTTP Response: Finally, the server sends back an HTTP response containing the HTML content.

Step 3: Conclusion.

The correct sequence of execution is:
(B) Calls an application → (A) HTTP Request → (C) Program executes → (D) HTTP Response.


Final Answer: \[ \boxed{The correct sequence is (B), (A), (C), (D).} \] Quick Tip: In web development, HTTP requests and responses follow a standard sequence for client-server interaction, where the client sends a request, the server processes it, and a response is returned with content.


Question 75:

Match List-I with List-II:
 

List – I List – II
(A) Static web page (I) A web page whose content keeps changing.
(B) Home page (II) A web page whose content is fixed.
(C) Dynamic web page (III) Delivers the contents to web browser.
(D) Web server (IV) First page of website.
  • Choose the correct answer from the options given below:
  • (A) (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
  • (B) (A) - (II), (B) - (III), (C) - (I), (D) - (IV)
  • (C) (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
  • (D) (A) - (III), (B) - (IV), (C) - (I), (D) - (II)
Correct Answer: (1) (A) - (II), (B) - (IV), (C) - (I), (D) - (III)
View Solution

Step 1: Understanding the terms.

- Static web page (A): A static web page is a page whose content is fixed and does not change unless manually updated.
- Home page (B): The home page is the first page of a website.
- Dynamic web page (C): A dynamic web page's content changes based on user interaction or other factors.
- Web server (D): A web server delivers the requested content to the web browser.

Step 2: Match the items.

- (A) Static web page matches with (II) A web page whose content is fixed.
- (B) Home page matches with (IV) First page of website.
- (C) Dynamic web page matches with (I) A web page whose content keeps changing.
- (D) Web server matches with (III) Delivers the contents to web browser.

Step 3: Conclusion.

The correct matching is:
(A) - (II), (B) - (IV), (C) - (I), (D) - (III).


Final Answer: \[ \boxed{The correct match is (A) - (II), (B) - (IV), (C) - (I), (D) - (III).} \] Quick Tip: A static web page has fixed content, while a dynamic web page changes its content dynamically. The home page is usually the first page the user sees when visiting a website.


Question 76:

Which of the following is a networking device?

  • (A) Gateway
  • (B) Repeater
  • (C) MAN
  • (D) Modem
  • (A) (A) and (D) only
  • (B) (A), (B) and (D) only
  • (C) (A), (B), (C) and (D)
  • (D) (B), (C) and (D) only
Correct Answer: (1) (A) and (D) only
View Solution

Step 1: Understanding networking devices.

Networking devices are hardware used to connect computers or other devices to the network and facilitate communication.

Step 2: Evaluate each option.

- Option (A) Gateway: A gateway is a device used to connect different networks and facilitate communication between them. It is a networking device.
- Option (B) Repeater: A repeater is a networking device that amplifies or regenerates signals to extend the range of a network.
- Option (C) MAN: A MAN (Metropolitan Area Network) is not a device but a type of network.
- Option (D) Modem: A modem (modulator-demodulator) is a device that converts digital data from a computer into an analog signal for transmission over telephone lines and vice versa, making it a networking device.

Step 3: Conclusion.

The correct networking devices are Gateway and Modem.


Final Answer: \[ \boxed{The correct networking devices are (A) Gateway and (D) Modem.} \] Quick Tip: Networking devices like gateway and modem play essential roles in connecting and enabling communication between different devices and networks.


Question 77:

______ is the largest WAN that connects billions of computers, smartphones, and millions of LANs from different countries.

  • (A) PAN
  • (B) WWW
  • (C) Ethernet
  • (D) Internet
Correct Answer: (4) Internet
View Solution

Step 1: Understanding WAN.

A WAN (Wide Area Network) is a telecommunications network that extends over a large geographical area, such as a city, country, or even globally.

Step 2: Evaluate each option.

- Option (1) PAN: A PAN (Personal Area Network) is a small network, usually limited to a small area like a room or personal workspace.
- Option (2) WWW: The WWW (World Wide Web) is a system of interlinked hypertext documents but not a network.
- Option (3) Ethernet: Ethernet is a protocol for local area networks (LANs), not a WAN.
- Option (4) Internet: The Internet is the largest WAN that connects billions of devices globally.

Step 3: Conclusion.

The correct answer is the Internet, as it is the largest WAN connecting devices globally.


Final Answer: \[ \boxed{The largest WAN is the Internet.} \] Quick Tip: The Internet is a global network of networks that connects millions of computers and devices worldwide, enabling communication and access to information.


Question 78:

The intellectual property right that is granted for inventions is ______.

  • (A) Copyright
  • (B) Patent
  • (C) Trademark
  • (D) Licensing
Correct Answer: (2) Patent
View Solution

Step 1: Understanding intellectual property rights.

Intellectual property rights protect the creations of the mind, such as inventions, designs, and artistic works.

Step 2: Evaluate each option.

- Option (1) Copyright: Copyright protects original works of authorship, such as books, music, and artwork, but not inventions.
- Option (2) Patent: A patent grants rights to inventions, such as new technologies or processes, providing the inventor exclusive rights to the invention.
- Option (3) Trademark: Trademarks protect brand names, logos, and other distinctive symbols, not inventions.
- Option (4) Licensing: Licensing is the process of granting permission to use intellectual property but is not an intellectual property right itself.

Step 3: Conclusion.

The correct intellectual property right for inventions is a patent.


Final Answer: \[ \boxed{The intellectual property right granted for inventions is a Patent.} \] Quick Tip: Patents are granted for inventions that provide a new, useful, and non-obvious solution to a problem, giving the inventor exclusive rights for a certain period.


Question 79:

Violation of intellectual property right may happen due to:

  • (A) Copyright Infringement
  • (B) Patent
  • (C) Trademark Infringement
  • (D) Plagiarism
  • (A) (A) and (C) only
  • (B) (A), (B) and (C) only
  • (C) (A), (B), (C) and (D)
  • (D) (A), (C) and (D) only
Correct Answer: (3) (A), (B), (C) and (D)
View Solution

Step 1: Understanding intellectual property violations.

Intellectual property rights can be violated through various means, such as unauthorized copying, use, or distribution of protected works. Violations can occur due to copyright infringement, trademark infringement, or even plagiarism.

Step 2: Evaluate each option.

- Option (A) Copyright Infringement: Copyright infringement occurs when a copyrighted work is used without permission, which is a violation of intellectual property rights.
- Option (B) Patent: A patent can be violated if an invention is used or sold without authorization from the patent holder, making it a violation.
- Option (C) Trademark Infringement: This occurs when a registered trademark is used without permission, violating the trademark owner’s rights.
- Option (D) Plagiarism: Plagiarism involves using someone else's work or ideas without proper attribution, which is also a violation of intellectual property rights.

Step 3: Conclusion.

All the listed options are valid causes for violating intellectual property rights.


Final Answer: \[ \boxed{All of the options are correct, making the correct answer (A), (B), (C) and (D).} \] Quick Tip: Intellectual property rights violations can occur in various forms such as copyright, patent, trademark infringement, or plagiarism. Always ensure proper permissions are obtained before using any intellectual property.


Question 80:

Match List-I with List-II:
 

List – I List – II
(A) Cyber Appellate Tribunal (I) Punishes people causing pollution.
(B) Environmental Protection Act 1986 (II) Provides guidelines for proper handling and disposal of e-waste.
(C) Indian Information Technology Act 2000 (III) Resolves disputes arising from cyber crime.
(D) Central Pollution Control Board (IV) Provides guidelines on storage, processing and transmission of sensitive data.

  • (A) (A) - (III), (B) - (I), (C) - (IV), (D) - (II)
  • (B) (A) - (I), (B) - (III), (C) - (II), (D) - (IV)
  • (C) (A) - (IV), (B) - (III), (C) - (I), (D) - (II)
  • (D) (A) - (III), (B) - (IV), (C) - (II), (D) - (I)
Correct Answer: (1) (A) - (III), (B) - (I), (C) - (IV), (D) - (II)
View Solution

Step 1: Understanding each item in List-I and List-II.

- Cyber Appellate Tribunal (A): It resolves disputes related to cyber crimes, especially those concerning cyber laws.
- Environmental Protection Act 1986 (B): This act deals with regulating pollution and safeguarding the environment, including e-waste.
- Indian Information Technology Act 2000 (C): This act governs cyberspace and addresses issues such as cybercrime and electronic commerce.
- Central Pollution Control Board (D): The Board formulates policies for controlling pollution and guides on the disposal of pollutants, including e-waste.

Step 2: Match the items.

- (A) Cyber Appellate Tribunal matches with (III) Resolves disputes arising from cyber crime.
- (B) Environmental Protection Act 1986 matches with (I) Punishes people causing pollution.
- (C) Indian Information Technology Act 2000 matches with (IV) Provides guidelines on storage, processing, and transmission of sensitive data.
- (D) Central Pollution Control Board matches with (II) Provides guidelines for proper handling and disposal of e-waste.

Step 3: Conclusion.

The correct match is:
(A) - (III), (B) - (I), (C) - (IV), (D) - (II).


Final Answer: \[ \boxed{The correct match is (A) - (III), (B) - (I), (C) - (IV), (D) - (II).} \] Quick Tip: Each of these laws and bodies plays a crucial role in regulating environmental and cyber issues, ensuring the safety and proper handling of data, waste, and pollution.


Question 81:

_____ is a branch of science that deals with designing and arranging of workplaces.

  • (A) Netiquette
  • (B) Ergonomics
  • (C) Leeching
  • (D) Refurbishing
Correct Answer: (2) Ergonomics
View Solution

Step 1: Understanding ergonomics.

Ergonomics is the branch of science that focuses on designing and arranging workplaces, products, and systems to optimize the well-being and efficiency of the people who use them.

Step 2: Evaluate each option.

- Option 1: Netiquette: Netiquette refers to the set of conventions for communicating on the internet, not related to workplace design.
- Option 2: Ergonomics: This is the correct answer. Ergonomics aims to improve comfort, productivity, and safety in the workplace.
- Option 3: Leeching: Leeching is unrelated to workplace design. It refers to the extraction of resources or benefits without giving anything in return.
- Option 4: Refurbishing: Refurbishing refers to the process of renovating or restoring, not specifically related to designing or arranging workplaces.

Step 3: Conclusion.

The correct branch of science that deals with the design and arrangement of workplaces is ergonomics.


Final Answer: \[ \boxed{Ergonomics is the branch of science that deals with designing and arranging workplaces.} \] Quick Tip: Ergonomics improves the overall well-being and productivity of individuals in a workplace through thoughtful design of tools, furniture, and tasks.


Question 82:

Sequence the steps to append data to an existing file and then read the entire file:

  • (A) Open the file in a+ mode.
  • (B) Use the read() method to output the contents.
  • (C) Use the write() or writelines() method to append data.
  • (D) Seek to the beginning of the file.
  • (A) (A), (C), (D), (B)
  • (B) (A), (B), (C), (D)
  • (C) (B), (A), (C), (D)
  • (D) (C), (B), (D), (A)
Correct Answer: (A)(A), (C), (D), (B)
View Solution

Step 1: Open the file in a+ mode.

To append data to an existing file and then read it, we need to open the file in a+ mode. This mode allows both appending and reading the file.

Step 2: Append data using write() or writelines().

Once the file is open in a+ mode, we can use the write() or writelines() method to append data to the file.

Step 3: Seek to the beginning of the file.

After appending the data, we need to move the file pointer to the beginning using seek(0). This allows us to read from the start of the file.

Step 4: Read the file contents using read().

Finally, we use the read() method to read and output the contents of the file from the beginning.

Step 5: Conclusion.

The correct sequence is:
1. (A) Open the file → 2. (C) Append data → 3. (D) Seek to beginning → 4. (B) Read contents.


Final Answer: \[ \boxed{The correct sequence is (A), (C), (D), (B).} \] Quick Tip: When appending and reading a file, always make sure to move the file pointer to the beginning using seek(0) before reading the file after appending data.


Question 83:

Sequence the given process for checking whether a string is a palindrome or not, using a deque:

  • (A) Load the string into the deque.
  • (B) Continuously remove characters from both ends.
  • (C) Compare the characters.
  • (D) Determine if the string is a palindrome based on the comparisons.
  • (A) (A), (B), (C), (D)
  • (B) (A), (B), (D), (C)
  • (C) (B), (A), (C), (D)
  • (D) (C), (B), (D), (A)
Correct Answer: (A)(A), (B), (C), (D)
View Solution

Step 1: Load the string into the deque.

To check if a string is a palindrome, we begin by loading the string into a deque data structure. This allows efficient removal of characters from both ends.

Step 2: Remove characters from both ends.

We then continuously remove characters from both ends of the deque for comparison.

Step 3: Compare the characters.

Next, we compare the characters from both ends to check if they match.

Step 4: Determine if it’s a palindrome.

If all the character comparisons are valid (i.e., all characters match from both ends), the string is a palindrome.

Step 5: Conclusion.

The correct sequence is:
1. (A) Load string → 2. (B) Remove characters → 3. (C) Compare characters → 4. (D) Check palindrome.


Final Answer: \[ \boxed{The correct sequence is (A), (B), (C), (D).} \] Quick Tip: A deque allows efficient removal of characters from both ends, making it an ideal data structure for palindrome checking.


Question 84:

Cable based broadband internet services are example of ..............

  • (A) LAN
  • (B) MAN
  • (C) WAN
  • (D) PAN
Correct Answer: (3) WAN
View Solution

Step 1: Understanding broadband internet services.

Broadband internet services are high-speed internet connections that allow continuous transmission of data and provide fast internet services over large geographical areas.

Step 2: Evaluating each option.

- Option 1: LAN (Local Area Network): LAN is a network limited to a small geographic area such as a single building. It is not typically used for broadband internet services.
- Option 2: MAN (Metropolitan Area Network): MAN covers a larger area than LAN, but it is still confined to a city or large campus. It may offer broadband services but does not fit broadband internet services for individual connections.
- Option 3: WAN (Wide Area Network): WAN covers large geographic areas, often spanning countries or continents. Cable-based broadband internet services often use WAN connections.
- Option 4: PAN (Personal Area Network): PAN is used for connecting devices within a small area, typically a few meters. It does not apply to broadband internet services.

Step 3: Conclusion.

Cable-based broadband internet services typically operate over WAN, which is the correct answer.


Final Answer: \[ \boxed{Cable-based broadband internet services are an example of WAN.} \] Quick Tip: Broadband internet services are typically delivered over WAN, as they require large-scale infrastructure to support widespread connectivity.


Question 85:

________ is the trail of data we leave behind when we visit any website (or use any online application or portal) to fill-in data or perform any transaction.

  • (A) Digital footprint
  • (B) Cyber crimes
  • (C) Cyber bullying
  • (D) Identity theft
Correct Answer: (1) Digital footprint
View Solution

Step 1: Understanding digital footprint.

A digital footprint is the record of everything we do online, such as websites visited, information provided, and transactions made. It includes both passive and active actions.

Step 2: Evaluating each option.

- Option 1: Digital footprint: This refers to the data trail left behind by our online activity, including visited websites, social media interactions, and online purchases.
- Option 2: Cyber crimes: Cyber crimes refer to illegal activities performed using computers or the internet, such as hacking, identity theft, and fraud. It is unrelated to the concept of a data trail.
- Option 3: Cyber bullying: Cyber bullying refers to harassment or bullying conducted online. It does not describe a data trail left behind.
- Option 4: Identity theft: Identity theft involves stealing someone’s personal information for malicious purposes, such as fraud or impersonation. It is not related to the data trail left online.

Step 3: Conclusion.

The correct term for the trail of data we leave behind while interacting online is a digital footprint.


Final Answer: \[ \boxed{The trail of data we leave behind when we visit a website or use an application is called the Digital Footprint.} \] Quick Tip: Be mindful of your digital footprint, as it is a record of all your online activities and can be tracked or analyzed by websites and third parties.

CUET Questions

  • 1.
    A person walks 10 m North, then turns right and walks 5 m, then turns right again and walks 10 m. What direction is he facing now?

      • North
      • South
      • East
      • West

    • 2.
      A projectile is fired with an initial velocity \( u \) at an angle \( \theta \) to the horizontal. The time of flight is \( T \). What is the maximum height \( H \) reached by the projectile?

        • \( \dfrac{u^2 \sin^2 \theta}{2g} \)
        • \( \dfrac{u^2 \sin 2\theta}{2g} \)
        • \( \dfrac{u^2 \sin^2 \theta}{g} \)
        • \( \dfrac{u^2 \sin \theta}{2g} \)

      • 3.
        The professor's explanation was so esoteric that even graduate students struggled to understand it. What is the meaning of "esoteric" in this context?

          • Easily understandable
          • Popular and widely accepted
          • Intended for or likely to be understood by a small, specialized group
          • Outdated or irrelevant

        • 4.
          Find the errors in the underlined part:
          Each of the students have submitted their assignments on time.

            • Each of the students
            • have submitted
            • their assignments
            • No error

          • 5.
            Rearrange the parts to form a logical sentence:
            A) the city's new policy
            B) has significantly improved
            C) air quality
            D) over the past year

              • ABCD
              • BCAD
              • ACBD
              • BACD

            • 6.
              Pointing to a man, Rani says, "He is the son of my mother's only daughter.” How is the man related to Rani?

                • Nephew
                • Brother
                • Cousin
                • Son

              Fees Structure

              Structure based on different categories

              CategoriesState
              General1750
              sc1650

              In case of any inaccuracy, Notify Us! 

              Comments


              No Comments To Show