logo

Question detail

A solution uses two Boolean inputs, A and B. What is the best way to check that its output is correct for every possible input combination?

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

MCQ

Type

practice

Style

Topic

Abstraction and automation

Exam-style question

Try this first

A solution uses two Boolean inputs, A and B. What is the best way to check that its output is correct for every possible input combination?.

  1. A.Test only when A and B are both true
  2. B.Test only when A and B are both false
  3. C.Test one randomly selected input combination
  4. D.Test all four combinations of A and B

Model answer

What a good answer should say

  • Test all four combinations of A and B

Explanation

Why this works

Two Boolean inputs have 2 × 2 = 4 possible combinations. Testing every combination checks the complete input space for this simple problem.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.