wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Arrays Quiz

Total questions: 40

Worksheet time: 46mins

Name
Class
Date
1.

What is an array?

a)

A method for sorting data

b)

A type of variable that cannot change

c)

A data structure that holds data of the same data type

d)

A single variable that can hold multiple values

2.

What is the index of the first element in an array?

a)

2

b)

0

c)

1

d)

None of the above

3.

What does the term 'subscript' or 'index' refer to in arrays?

a)

The name of the array

b)

The size of the array

c)

The position number of an item in an array

d)

The data type of the array

4.

How do you declare an array to hold 5 integers in pseudocode?

a)

arrayName = Array[5]

b)

int array = new int[5];

c)

int array[5];

d)

int array(5);

5.

What is the purpose of the 'GET value' operation on arrays?

a)

To display the values

b)

To find the largest number

c)

To store values in the array

d)

To sort the array

6.

Which operation is used to find a value in an array?

a)

Search

b)

Update

c)

Display

d)

Capture

7.

What is the maximum index for an array of size 5?

a)

4

b)

3

c)

6

d)

5

8.

What is the result of reversing an array?

a)

Sorting the array

b)

Displaying the array from last to first

c)

Updating the array

d)

Finding the largest number

9.

In a one-dimensional array, how are elements stored in memory?

a)

Contiguously

b)

In a tree structure

c)

Randomly

d)

In a linked list

10.

What is the purpose of the 'Update' operation on arrays?

a)

To sort the array

b)

To display all values

c)

To find the smallest number

d)

To change a value in the array

11.

Which of the following is a type of array?

a)

One Dimensional

b)

All of the above

c)

Two Dimensional

d)

Jagged

12.

What is the average calculated from an array of numbers?

a)

The smallest number in the array

b)

The largest number in the array

c)

The middle number in the array

d)

The sum of all numbers divided by the count

13.

What does the 'Sort' operation do?

a)

Finds the largest element

b)

Displays elements

c)

Reverses the order of elements

d)

Arranges elements in a specific order

14.

What is the first step in capturing values for an array?

a)

Display the values

b)

Calculate the total

c)

Sort the values

d)

Prompt for input

15.

What is the purpose of declaring an array?

a)

To store values

b)

To define its size and type

c)

To display values

d)

To sort values

16.

Which of the following is a valid way to access the third element of an array?

a)

array{3}

b)

array[2]

c)

array[3]

d)

array(3)

17.

What is the result of searching for a name in an array of names?

a)

Finding the name's length

b)

Finding the name's index

c)

Finding the name's type

d)

Finding the name's value

18.

An individual data item within an array is called an (a)   .

19.

DECLARE numbers AS ARRAY[5]

SET numbers = [10, 20, 30, 40, 50]

PRINT numbers[2]


What will the result be?

a)

10

b)

20

c)

30

d)

50

20.

If you have an array scores[5] initialized as [50, 60, 70, 80, 90], how would you update the third element (index 2) to 75?

a)

scores[3] = 75

b)

scores[2] = 75

c)

scores[1] = 75

d)

scores[4] = 75

21.

A company keeps track of employee salaries using an array salaries[10]. The manager wants to find the highest salary. What is the best approach?

a)

Sort the array and pick the last element

b)

Search for the highest value using a loop

c)

Multiply all values and find the highest

d)

Subtract all values from a large number

22.

DECLARE temperatures AS ARRAY[4]

SET temperatures = [22.5, 25.0, 21.8, 23.1]

SET total = 0

FOR i FROM 0 TO 3

total = total + temperatures[i]

END FOR

PRINT total / 4

What does this pseudocode compute?

a)

The highest temperature

b)

The sum of all temperatures

c)

The average temperature

d)

The difference between highest and lowest temperature

23.

What is the correct way to declare a 2D array for storing student marks for 5 students and 3 subjects in pseudocode?

a)

DECLARE marks[5]

b)

DECLARE marks[5,3]

c)

DECLARE marks[3,5]

d)

DECLARE marks[3]

24.

If a 2D array matrix[3,3] is initialized as follows:

matrix = [[1,2,3], [4,5,6], [7,8,9]] PRINT matrix[1,2]

What is the output?

a)

2

b)

5

c)

6

d)

9

25.

DECLARE sales[3,3]

SET sales = [[10,20,30], [40,50,60], [70,80,90]]

FOR i FROM 0 TO 2

PRINT sales[i,1]

END FOR

What will be printed out?

a)

10, 40, 70

b)

20, 50, 80

c)

30, 60, 90

d)

40, 50, 60

26.

Describe yourself in 10 years from now based on your current study habits.
(Are you a billionaire tech genius, or still debugging your first program?)

4 lines
27.

Imagine BC's IT department has made a terrible mistake. Write a newspaper headline about what happened. (Example: All WiFi Passwords Changed to ‘1234’—Campus in Chaos! 🚀)

4 lines
28.

If your computer could talk, what excuse would it give for not submitting your assignment on time?

4 lines
29.

Draw your 3 essential items needed as a first-year.

30.

Have you ever wondered what goes on inside people's heads (inside-out reference)

Draw what you think is going on inside your head during tests.

31.

Which meme perfectly sums up your first-year experience so far?

4 lines
32.

Why did you choose this field of study?

a)

Passion and interest

b)

Hoping to make serious money

c)
  • Seemed easier than other options

d)

I let fate (or my parents) decide

33.

If you could have one special ability to help you survive university, which would it be?

a)

The ability to pause time before deadlines

b)

Infinite coffee with no side effects

c)

Instantly understand all lecture material by sleeping on your textbook

d)

Auto-run feature to make it to class 1 minute before it starts

34.

What’s your current emotional state?

a)

"I got this!"

b)

Living for the weekend

c)

"Just trying to survive"

d)

"If I ignore my assignments, they don’t exist, right?"

35.

If your life was a movie, what would the title be?

4 lines
36.

How does a group project usually go?

a)

One person does everything

b)

“Let’s meet up to discuss it” (never happens)

c)

Someone just makes a cool cover page and disappears

d)

Last-minute chaos and panic

37.

What’s your financial situation looking like?

a)

R10 in my bank account, but vibes are still high

b)

Living off air & water till payday

c)

Can’t afford lunch, but I’ll make a plan for a drink (or 3) at De Akker

d)

I've got dough like it's a Checkers bakery

38.

What is the ultimate budget-friendly student meal?

(2 minute noodles is too obvious, something else?)

4 lines
39.

What is the best way to "influence" your lecturer for better marks?

4 lines
40.

If Uni doesn't work out, what's your backup plan?

4 lines