Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Tech Tournament Knockouts QF-1

Total questions: 20

Worksheet time: 30mins

Name
Class
Date
1.

Which principle of OOP refers to bundling data and methods into a single unit?

a)

Encapsulation

b)

Inheritance

c)

Polymorphism

d)

Abstraction

2.

Which OOP principle allows an object to take many forms depending on context?

a)

Polymorphism

b)

Inheritance

c)

Composition

d)

Aggregation

3.

Assertion (A): Abstract classes can have both abstract and non-abstract methods. Reason (R): Abstraction hides implementation details while providing a blueprint for derived classes.

a)

A true, R true, R explains A

b)

A true, R true, R does not explain A

c)

A true, R false

d)

A false, R true

4.

I ensure that one interface can be used for multiple implementations. Who am I?

a)

Overloading

b)

Overriding

c)

Polymorphism

d)

Abstraction

5.

Consider a scenario: A base class defines a method, and a derived class replaces it with its own implementation at runtime. This is an example of:

a)

Static binding

b)

Method overloading

c)

Method overriding

d)

Encapsulation

6.

A system is designed with multiple inheritance. Which of the following issues is most commonly associated with this design?

a)

Runtime polymorphism failure

b)

Diamond problem

c)

Data abstraction violation

d)

Method hiding

7.

Which normal form eliminates partial dependency?

a)

1NF

b)

2NF

c)

3NF

d)

BCNF

8.

A transaction in DBMS must follow the ACID properties. The "I" stands for:

a)

Integrity

b)

Isolation

c)

Independence

d)

Indexing

9.

Which of the following anomalies occurs when a transaction reads the same data twice and gets different results due to another concurrent transaction’s updates?

a)

Lost update

b)

Dirty read

c)

Non-repeatable read

d)

Phantom read

10.

Consider two transactions: T1: Reads X, increments by 10, writes X T2: Reads X, decrements by 5, writes X If run concurrently without locking, what problem may occur?

a)

Phantom read

b)

Cascading abort

c)

Lost update

d)

Deadlock

11.

In a database system using strict two-phase locking, which of the following is TRUE?

a)

Deadlocks cannot occur under strict 2PL

b)

Cascading rollbacks cannot occur under strict 2PL

c)

Dirty reads are possible under strict 2PL

d)

Phantom reads are eliminated under strict 2PL

12.

Consider a relation R(A, B, C, D) with functional dependencies: • A → B • C → D • AC → B Which of the following is a candidate key?

a)

A only

b)

AC

c)

AD

d)

CD

13.

Which of the following scenarios benefits the most from a bitmap index?

a)

A table with millions of rows and high-cardinality attributes

b)

A small lookup table with unique keys

c)

A fact table column storing gender values (Male/Female/Other)

d)

A relation with frequent range queries on numeric data

14.

Fill in the blank: In OOP, using (a)   avoids tight coupling by preferring composition over inheritance.

15.
  1. Which join returns all rows when there is a match in one of the tables?

a)
  1. INNER JOIN

b)
  1. FULL OUTER JOIN

c)
  1. CROSS JOIN

d)

LEFT JOIN

16.

In strict 2PL, when are locks released?

a)
  1. After each operation

b)
  1. After read phase

c)
  1. At commit/abort

d)
  1. At scheduler’s discretion

17.
  1. In Java OOP, which of the following cannot be overridden (non-virtual)?

a)
  1. Constructor

b)
  1. Instance method

c)
  1. Abstract method

d)
  1. Overridden method

18.
  1. In OOP, what is the diamond problem mainly related to?

a)
  1. Function overloading

b)
  1. Multiple inheritance

c)
  1. Dynamic binding

d)
  1. Encapsulation

19.
  1. Two interfaces provide the same default method. Implementing class without override:

a)

First wins

b)
  1. Last wins

c)
  1. Compile error

d)
  1. Runtime error

20.
  1. Which SQL statement adds a NOT NULL constraint on column age?

a)
  1. ALTER TABLE emp ADD NOT NULL(age);

b)
  1. ALTER TABLE emp ADD CONSTRAINT age NOT NULL;

c)
  1. ALTER TABLE emp MODIFY age NOT NULL;

d)
  1. ALTER TABLE emp DROP age NOT NULL;