Computer Science Practice Tests

These Grade 11 Additional Subjects practice tests examine algorithms, abstraction, decomposition, variables, control structures, functions, data structures, complexity, debugging, Internet systems, cybersecurity, databases, privacy, and computational ethics.

Skills covered

  • Explaining algorithms, abstraction, decomposition, variables, Boolean logic, loops, conditionals, functions, and parameters
  • Comparing arrays, stacks, queues, maps, sets, trees, graphs, searching, Big O, and common algorithmic strategies
  • Diagnosing syntax, runtime, logic, boundary, testing, and edge-case errors
  • Understanding packets, IP addresses, DNS, HTTP, APIs, encryption, authentication, phishing, and multifactor security
  • Evaluating bandwidth, latency, cloud computing, databases, SQL, algorithmic bias, privacy, anonymization, and consent

How to use these practice tests

Identify the input, process, data structure, or system first. Then trace the behavior, compare the relevant trade-off, and consider security, privacy, fairness, and reliability where appropriate.

For more Grade 11 Additional Subjects practice, return to the Grade 11 Additional Subjects category.

3. Test

Grade 11 Computer Science Practice Tests

Practice Grade 11 Additional Subjects questions about algorithms, programming, data structures, complexity, debugging, Internet systems, cybersecurity, databases, privacy, and computational ethics.

Choose the best answer. Identify the computational process, data structure, network concept, security practice, or ethical principle described by the prompt.

10 Questions
0/10 Questions0 %
Correct 0
Incorrect 0
Unanswered 10
1. QuestionMultiple choice

What is an off-by-one error?

Please select an answer first.

Correct answer: A

The correct answer is A mistake caused by starting or ending an index or count one position too early or too late.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: Off-by-one errors often occur at boundaries, such as the first or last valid index.
  3. Check the result: The correct answer is A mistake caused by starting or ending an index or count one position too early or too late.

Off-by-one errors often occur at boundaries, such as the first or last valid index.

2. QuestionMultiple choice

What is a syntax error?

Please select an answer first.

Correct answer: B

The correct answer is A violation of the grammar or structure rules of a programming language.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: Syntax errors prevent a parser or compiler from interpreting the program as valid code.
  3. Check the result: The correct answer is A violation of the grammar or structure rules of a programming language.

Syntax errors prevent a parser or compiler from interpreting the program as valid code.

3. QuestionMultiple choice

What is a runtime error?

Please select an answer first.

Correct answer: C

The correct answer is An error that occurs while a program is executing.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: Runtime errors can result from invalid operations such as dividing by zero, missing files, or invalid indexes.
  3. Check the result: The correct answer is An error that occurs while a program is executing.

Runtime errors can result from invalid operations such as dividing by zero, missing files, or invalid indexes.

4. QuestionMultiple choice

What is a logic error?

Please select an answer first.

Correct answer: D

The correct answer is A flaw that allows a program to run but causes an incorrect result.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: Logic errors require testing and reasoning because the program may appear to work while implementing the wrong algorithm.
  3. Check the result: The correct answer is A flaw that allows a program to run but causes an incorrect result.

Logic errors require testing and reasoning because the program may appear to work while implementing the wrong algorithm.

5. QuestionMultiple choice

What is a greedy algorithm?

Please select an answer first.

Correct answer: A

The correct answer is An algorithm that repeatedly chooses the best-looking local option at each step.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: Greedy methods can be efficient, but a local choice does not always produce a globally optimal result.
  3. Check the result: The correct answer is An algorithm that repeatedly chooses the best-looking local option at each step.

Greedy methods can be efficient, but a local choice does not always produce a globally optimal result.

6. QuestionMultiple choice

What is divide-and-conquer?

Please select an answer first.

Correct answer: B

The correct answer is Solving a problem by dividing it into smaller problems, solving them, and combining the results.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: Divide-and-conquer reduces a large problem into related smaller instances that can be solved recursively or independently.
  3. Check the result: The correct answer is Solving a problem by dividing it into smaller problems, solving them, and combining the results.

Divide-and-conquer reduces a large problem into related smaller instances that can be solved recursively or independently.

7. QuestionMultiple choice

What is dynamic programming?

Please select an answer first.

Correct answer: C

The correct answer is Solving overlapping subproblems while storing results so they are not recomputed.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: Dynamic programming improves efficiency by reusing solutions to subproblems.
  3. Check the result: The correct answer is Solving overlapping subproblems while storing results so they are not recomputed.

Dynamic programming improves efficiency by reusing solutions to subproblems.

8. QuestionMultiple choice

What is a heuristic?

Please select an answer first.

Correct answer: D

The correct answer is A practical rule or approximation that often finds a useful solution without guaranteeing the best one.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: Heuristics trade certainty of optimality for speed, simplicity, or usefulness on difficult problems.
  3. Check the result: The correct answer is A practical rule or approximation that often finds a useful solution without guaranteeing the best one.

Heuristics trade certainty of optimality for speed, simplicity, or usefulness on difficult problems.

9. QuestionMultiple choice

What is tracing a program?

Please select an answer first.

Correct answer: A

The correct answer is Following variable values and executed instructions step by step.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: A trace table or similar method helps reveal where actual program behavior diverges from the intended behavior.
  3. Check the result: The correct answer is Following variable values and executed instructions step by step.

A trace table or similar method helps reveal where actual program behavior diverges from the intended behavior.

10. QuestionMultiple choice

What is an edge case?

Please select an answer first.

Correct answer: B

The correct answer is An unusual or boundary input that tests whether a program handles limits correctly.

  1. Identify the computing concept: Determine whether the prompt describes an algorithm, data structure, program behavior, network, security practice, or ethical issue.
  2. Apply the computational principle: Testing empty collections, minimum values, maximum values, and other boundaries can reveal hidden errors.
  3. Check the result: The correct answer is An unusual or boundary input that tests whether a program handles limits correctly.

Testing empty collections, minimum values, maximum values, and other boundaries can reveal hidden errors.