A question bank for every class and subject

Practice questions, with answers and explanations included

794 questions available

Refine

All questions

794 results
421

Define the term: Input Device

SHORT Easy
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: A device used to provide data/instructions to a computer, e.g., keyboard, mouse, scanner.
422

Placing a semicolon at the end of a for statement, e.g., for(int count=1; count<=5; count++);, causes:

MCQ Hard
a. A compile-time error
b. The loop body to be treated as empty, executing only once after the loop terminates
c. The loop to run forever
d. No effect at all
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
The loop body to be treated as empty, executing only once after the loop terminates
Explanation: The semicolon creates an empty loop body (does nothing 5 times); the block that follows in curly braces then executes just once, after the loop terminates — not the intended behavior.
423

Which statement is used to select a database and make it the current database?

SHORT Easy
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: USE <databasename>; e.g., USE School;
424

Define the term: Output Device

SHORT Easy
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: A device used to present the processed result to the user, e.g., monitor, printer, speaker.
425

The switch statement in Java can evaluate an expression of type float.

TRUE FALSE Medium
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
FALSE
Explanation: The switch expression must evaluate to byte, short, int, or char — not float or double.
426

List the four DML commands mentioned in the chapter.

SHORT Easy
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: INSERT, SELECT, UPDATE, DELETE.
427

Define the term: Processor

SHORT Easy
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: The component (CPU) that executes instructions and coordinates all other units of the computer, primarily responsible for its performance.
428

A do-while loop always runs at least once, even if the test condition is initially false.

TRUE FALSE Easy
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
TRUE
Explanation: Because the do-while loop tests its condition after executing the body, it always runs at least once.
429

Write the SQL statement to create a table named 'Shoes' with columns Code (CHAR(4), Primary Key), Name (VARCHAR(20)), type (VARCHAR(10)), size (INT(2), NOT NULL), cost (DECIMAL(6,2)), margin (DECIMAL(4,2)), and Qty (INT(4)).

LONG Medium
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: CREATE TABLE Shoes (Code CHAR(4) PRIMARY KEY, Name VARCHAR(20), type VARCHAR(10), size INT(2) NOT NULL, cost DECIMAL(6,2), margin DECIMAL(4,2), Qty INT(4));
430

Differentiate between Bus Topology and Star Topology.

LONG Medium
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: Bus topology uses a single backbone cable with nodes connected via taps, requiring less cabling but with difficult fault detection; a break in the backbone can disrupt the whole network. Star topology connects all devices to a central hub, needs more cabling, but fault detection/isolation is easier; however, hub failure disrupts the whole network.
431

In a for loop, you can use the comma operator to include multiple initialization/update expressions, e.g., for(x=0,y=10; x<10; x++,y--).

TRUE FALSE Medium
a. TRUE
b. FALSE
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
TRUE
Explanation: The comma operator allows multiple items in the initialization and update parts of a for loop.
432

Which keyword is used with SELECT to eliminate repeated (duplicate) values from the result?

MCQ Easy
a. UNIQUE
b. DISTINCT
c. ALL
d. ONLY
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
DISTINCT
Explanation: The DISTINCT keyword eliminates duplicate values from the result set of a SELECT query.
433

Differentiate between Star Topology and Tree Topology.

LONG Medium
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: In Star topology, all devices connect to a single central hub, and communication passes through it. Tree topology is a hybrid of star and bus, where a backbone (bus) cable acts as the stem and star networks/nodes branch off it like tree branches; damage to one segment does not affect other segments, but installation is more complex.
434

Differentiate between a while loop and a do-while loop (name at least two differences).

SHORT Medium
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: A while loop is entry-controlled (tests the condition before running the loop body) and may run zero or more times. A do-while loop is exit-controlled (tests the condition after running the body) and runs at least once. Also, in a do-while loop, the test condition variables need not be initialized before entering the loop, unlike a while loop.
435

Which clause is used to filter rows based on a specified condition?

MCQ Easy
a. ORDER BY
b. GROUP BY
c. WHERE
d. HAVING
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
WHERE
Explanation: The WHERE clause is used to fetch only those rows that satisfy a specified condition/criterion.
436

Differentiate between Star Topology and Mesh Topology.

LONG Medium
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: Star topology connects all nodes to one central hub, requiring moderate cabling but risking total failure if the hub fails. Mesh topology connects every node to every other node directly, requiring the most cabling but offering secure, traffic-free communication with no single point of failure.
437

Write the Java syntax for the if-else, switch, while, do-while, and for statements.

LONG Medium
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Explanation: if-else: if(expression) { statements } else { statements } switch: switch(expression) { case constant1: statements; break; ... default: statements; break; } while: while(expression) { statements } do-while: do { statements } while(expression); for: for(initial_value; test_condition; change_counter) { statements }
438

Which SQL statement is used to modify existing data (records) within a table?

MCQ Easy
a. CHANGE
b. MODIFY
c. UPDATE
d. ALTER
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
UPDATE
Explanation: The UPDATE command modifies existing data in the rows of a table, typically used along with the WHERE clause.
439

Differentiate between Ring Topology and Bus Topology.

LONG Medium
Information Technology (802) · Class 11 · Sep 26, 2026
Show answer
Explanation: In Ring topology, devices are connected in a closed loop and messages travel in one direction around the ring; addition/deletion of nodes and fault detection are easy, but a single point failure can disrupt the whole network. In Bus topology, devices connect to a common backbone cable; it needs less cabling but fault detection/isolation is difficult.
440

An array in Java is used to:

MCQ Easy
a. Store only a single value
b. Hold a list of values of the same data type
c. Define a class
d. Handle exceptions
Information Technology (802) · Class 12 · Sep 26, 2026
Show answer
Hold a list of values of the same data type
Explanation: An array is a variable that can hold more than one value (a list of values) of the same data type.