WorksheetsArrays Quiz
Total questions: 40
Worksheet time: 46mins
What is an array?
A method for sorting data
A type of variable that cannot change
A data structure that holds data of the same data type
A single variable that can hold multiple values
What is the index of the first element in an array?
2
0
1
None of the above
What does the term 'subscript' or 'index' refer to in arrays?
The name of the array
The size of the array
The position number of an item in an array
The data type of the array
How do you declare an array to hold 5 integers in pseudocode?
arrayName = Array[5]
int array = new int[5];
int array[5];
int array(5);
What is the purpose of the 'GET value' operation on arrays?
To display the values
To find the largest number
To store values in the array
To sort the array
Which operation is used to find a value in an array?
Search
Update
Display
Capture
What is the maximum index for an array of size 5?
4
3
6
5
What is the result of reversing an array?
Sorting the array
Displaying the array from last to first
Updating the array
Finding the largest number
In a one-dimensional array, how are elements stored in memory?
Contiguously
In a tree structure
Randomly
In a linked list
What is the purpose of the 'Update' operation on arrays?
To sort the array
To display all values
To find the smallest number
To change a value in the array
Which of the following is a type of array?
One Dimensional
All of the above
Two Dimensional
Jagged
What is the average calculated from an array of numbers?
The smallest number in the array
The largest number in the array
The middle number in the array
The sum of all numbers divided by the count
What does the 'Sort' operation do?
Finds the largest element
Displays elements
Reverses the order of elements
Arranges elements in a specific order
What is the first step in capturing values for an array?
Display the values
Calculate the total
Sort the values
Prompt for input
What is the purpose of declaring an array?
To store values
To define its size and type
To display values
To sort values
Which of the following is a valid way to access the third element of an array?
array{3}
array[2]
array[3]
array(3)
What is the result of searching for a name in an array of names?
Finding the name's length
Finding the name's index
Finding the name's type
Finding the name's value
An individual data item within an array is called an (a) .
DECLARE numbers AS ARRAY[5]
SET numbers = [10, 20, 30, 40, 50]
PRINT numbers[2]
What will the result be?
10
20
30
50
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?
scores[3] = 75
scores[2] = 75
scores[1] = 75
scores[4] = 75
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?
Sort the array and pick the last element
Search for the highest value using a loop
Multiply all values and find the highest
Subtract all values from a large number
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?
The highest temperature
The sum of all temperatures
The average temperature
The difference between highest and lowest temperature
What is the correct way to declare a 2D array for storing student marks for 5 students and 3 subjects in pseudocode?
DECLARE marks[5]
DECLARE marks[5,3]
DECLARE marks[3,5]
DECLARE marks[3]
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?
2
5
6
9
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?
10, 40, 70
20, 50, 80
30, 60, 90
40, 50, 60
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?)
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! 🚀)
If your computer could talk, what excuse would it give for not submitting your assignment on time?
Draw your 3 essential items needed as a first-year.

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.

Which meme perfectly sums up your first-year experience so far?
Why did you choose this field of study?
Passion and interest
Hoping to make serious money
Seemed easier than other options
I let fate (or my parents) decide
If you could have one special ability to help you survive university, which would it be?
The ability to pause time before deadlines
Infinite coffee with no side effects
Instantly understand all lecture material by sleeping on your textbook
Auto-run feature to make it to class 1 minute before it starts
What’s your current emotional state?
"I got this!"
Living for the weekend
"Just trying to survive"
"If I ignore my assignments, they don’t exist, right?"
If your life was a movie, what would the title be?
How does a group project usually go?
One person does everything
“Let’s meet up to discuss it” (never happens)
Someone just makes a cool cover page and disappears
Last-minute chaos and panic
What’s your financial situation looking like?
R10 in my bank account, but vibes are still high
Living off air & water till payday
Can’t afford lunch, but I’ll make a plan for a drink (or 3) at De Akker
I've got dough like it's a Checkers bakery
What is the ultimate budget-friendly student meal?
(2 minute noodles is too obvious, something else?)
What is the best way to "influence" your lecturer for better marks?
If Uni doesn't work out, what's your backup plan?
