NEW
Font size
WorksheetsDiagnostic Test Computer Science
Total questions: 20
Worksheet time: 10mins
You are given the following pseudocode:
SET counter TO 0 FOR i FROM 1 TO 5. counter ← counter + 2 ENDFOR OUTPUT counter What is the final output of this algorithm?
0
5
10
25
What type of data is most suitable for storing whether a student has passed an exam (true or false)?
Integer
String
Real
Boolean
A school wants to store the names of 30 students in a class. What is the main advantage of using a one-dimensional array for this task instead of 30 separate string variables?
Arrays use less memory.
Arrays allow managing all names under a single identifier, making code writing and maintenance easier (for example, using a loop).
Arrays automatically sort names alphabetically.
Arrays can store different types of data together.
The process of converting analog sound into a digital format involves two main steps. These are:
Compression and Encryption
Sampling and Quantization
Upload and Download
Recovery and Execution
Which of the following is a main task of a computer's operating system?
Create text documents and presentations.
Manage the memory and processes of the computer.
Provide electrical power to the components.
Design the physical layout of the motherboard.
In the Recover-Decode-Execute cycle, what is the purpose of the 'Decode' step?
Retrieve the next instruction from memory.
Increment the value of the Program Counter.
Make sense of the instruction that was retrieved.
Execute the instruction.
You are looking for a specific book in a library where all the books are sorted by the author's last name. What search algorithm would be the most efficient?
Linear Search
Binary Search
Bubble Search
Random Search
A network where all devices are connected to a switch or central server is known as a ________ topology.
Bus
Ring
Star
Mesh
The main purpose of a protocol like HTTP is:
To provide power to a network router.
To define a set of rules on how web browsers and servers communicate.
To physically connect a computer to a network.
To prevent viruses from infecting a computer.
What is the main purpose of a parity bit in data transmission?
Encrypt the data for greater security.
Compress the data to save space.
Detect simple errors in the transmitted data.
Increase the transmission speed.
A program is designed to calculate the average of three numbers. Which of the following is an example of invalid test data for this program?
(5, 5, 5)
(-1, 0, 1)
(Ten, Twenty, Thirty)
(1000000, 2000000, 3000000)
What is the central idea behind 'Big Data'?
To use the largest possible hard drives.
The analysis of extremely large and complex datasets to reveal patterns and trends.
To send large files over the internet.
The physical size of database servers.
The programmer writes a line of code like PRINT "Hello World", but the correct syntax of the language is print(). The program will fail to execute. This is an example of a:
Logical error
Runtime error
Syntax error
Network error
In a spreadsheet, which function would you use to find the smallest value in a range of cells (for example, A1 to A10)?
=MIN(A1:A10)
=MAX(A1:A10)
=COUNT(A1:A10)
=SUM(A1:A10)
The main purpose of using iterative development in a programming project is:
To write all the code perfectly on the first attempt.
To create a prototype, test it, get feedback, and improve it in repeated cycles.
To iterate means to use loops in the code.
To ensure that the program only uses the latest technology.
What is the main difference between a compiler and an interpreter?
A compiler translates the code all at once, while an interpreter translates and executes line by line.
An interpreter is faster in executing code than a compiler.
A compiler is only used for web pages.
An interpreter produces a standalone executable file.
A driver is a type of utility software. What is its main function?
Protect against viruses.
Organize files on a hard drive.
Allow the operating system to communicate with a hardware device (such as a printer).
Connect to the Internet.
When evaluating a new prototype for a smart watch, which factor is most related to accessibility?
The battery life of the device.
How easy it is for people with visual disabilities to use the touchscreen and hear its audio signals.
The processing speed of its CPU.
The number of different colors it has.
A weather station uses an anemometer. This is an example of a:
Actuator
Sensor
Output device
Storage device
Look at the algorithm in pseudocode. This algorithm is an example of which two programming constructs?
Sequence and Iteration
Sequence and Selection
Selection and Iteration
Variables and Operators
