wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Concepts for Grade 10

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

What is the time complexity of a binary search algorithm?

a)

O(log n)

b)

O(n)

c)

O(n log n)

d)

O(1)

2.

Which of the following is not a type of sorting algorithm?

a)

Data Compression

b)

Merge Sort

c)

Quick Sort

d)

Binary Search

3.

In a flowchart, what does a diamond shape represent?

a)

A decision point or branching in the flow.

b)

A process step in the flow.

c)

An end point in the flow.

d)

A start point in the flow.

4.

What is the output of the following C code: int main() { printf('%d', 5 + 3); return 0; }?

a)

Runtime error

b)

Compilation success

c)

Output: 8

d)

Compilation error

5.

Which of the following is a valid variable name in C?

a)

1varname

b)

varname!

c)

var-name

d)

var_name1

6.

What is the purpose of a flowchart in programming?

a)

To replace the need for programming languages

b)

The purpose of a flowchart in programming is to illustrate the sequence of operations and decision points in a program.

c)

To serve as a user interface design tool

d)

To provide a detailed code implementation

7.

Which operator is used for logical AND in C?

a)

||

b)

&&

c)

and

d)

&

8.

What is the first step in designing an algorithm?

a)

Test the algorithm thoroughly.

b)

Choose a programming language.

c)

Write the code immediately.

d)

Define the problem clearly.

9.

In C programming, what does the 'return 0;' statement signify?

a)

Signifies the start of the program execution.

b)

Indicates an error in the program.

c)

Marks the end of a function without returning a value.

d)

Indicates successful program termination.

10.

What is the correct syntax for a for loop in C?

a)

for(initialization, condition, increment) { // code to execute }

b)

for(initialization; condition; increment) { // code to execute }

c)

for(initialization; increment; condition) { // code to execute }

d)

for(condition; initialization; increment) { // code to execute }

11.

Which of the following is a characteristic of an algorithm?

a)

An algorithm must be finite.

b)

An algorithm must be random.

c)

An algorithm requires human intervention to execute.

d)

An algorithm can be infinite.

12.

What does a rectangle represent in a flowchart?

a)

A decision point in the process.

b)

A connector between different flowchart elements.

c)

A process or operation.

d)

An input or output operation.