Arrays, Searching & Sorting Algorithms is one of 10 topics in the Grade 11 Information Technology CAPS syllabus, covered across 3 lessons on Study Vault. Below are real practice questions from this topic with full worked answers.
Sample practice questions
Easy
1. What is a nested loop?
A loop placed entirely inside the body of another loop
Two completely separate loops that never interact
A loop that can never repeat more than once
A type of array with only one index
Answer: A loop placed entirely inside the body of another loop — A nested loop is a loop placed entirely inside the body of another loop, where the inner loop completes all its repetitions each time the outer loop executes once.
Easy
2. In a one-dimensional array, what is used to access an individual value?
A position number called an index
The value's alphabetical order
A separate variable name for every single value
The array's total data type
Answer: A position number called an index — Each individual value in an array is accessed using a position number called an index, with the first position typically at index 0.
Medium
3. An outer loop repeats 4 times, and a nested inner loop inside it repeats 5 times on every single pass of the outer loop. In total, how many times do the inner loop's instructions run?
Answer: 20 — The inner loop runs 5 times for each of the outer loop's 4 repetitions, so the total is 4 x 5 = 20 times.