wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AverageRound

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which programming concept allows an object to take on many forms, such as an object of a subclass being treated as an object of its superclass?

a)

Encapsulation

b)

Abstraction

c)

Polymorphism

d)

Inheritance

2.

Which of the following best describes 'method overloading' in object-oriented programming?

a)

Defining multiple methods in the same class with the same name but different parameter lists.

b)

Defining a method in a subclass with the same signature (name and parameters) as a method in its superclass.

c)

Calling a method from within the same method, creating a recursive call.

d)

Making a method private so it can only be accessed from within its own class.

3.

What is the primary benefit of using version control systems (like Git) in programming projects?

a)

To deploy web applications to a server.

b)

To compile source code into executable programs.

c)

To track changes, collaborate effectively, and revert to previous versions of code.

d)

To automatically optimize code for faster execution.

4.

Consider two tables: `Orders` (OrderID, CustomerID, OrderDate) and `Customers` (CustomerID, CustomerName). Which type of SQL JOIN would return only the orders that have a matching customer?

a)

FULL OUTER JOIN

b)

INNER JOIN

c)

LEFT JOIN

d)

RIGHT JOIN

5.

Which SQL aggregate function is used to calculate the number of rows in a table?

a)

COUNT()

b)

MAX()

c)

SUM()

d)

AVG()

6.

An algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order, is known as a:

a)

Binary Search

b)

Bubble Sort

c)

Merge Sort

d)

Quick Sort

7.

An algorithm with a time complexity of O(log n) means its execution time:

a)

Remains constant regardless of the input size.

b)

Grows exponentially with the input size.

c)

Grows very slowly, often halving the search space with each step.

d)

Grows linearly with the input size.

8.

What is the primary purpose of a Dynamic Host Configuration Protocol (DHCP) server?

a)

To filter network traffic based on security rules.

b)

To assign unique IP addresses and other network configuration parameters to devices automatically.

c)

To translate domain names into IP addresses.

d)

To connect different networks and route data packets between them.

9.

What type of malware encrypts a victim's files and demands a payment (ransom) to restore access?

a)

Rootkit

b)

Spyware

c)

Ransomware

d)

Adware

10.

A 'zero-day exploit' refers to:

a)

An attack that completely wipes out all data on a system, leaving 'zero' recoverable files.

b)

A security vulnerability that is unknown to the software vendor and for which no patch is available.

c)

A type of attack that requires zero interaction from the victim.

d)

A cyberattack that occurs on the first day a new software version is released.