logo

AQA A-Level Computer Science practice

Which string is recognised by the regular expression ab+?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Regular languages

Exam-style question

Try this first

Which string is recognised by the regular expression ab+?.

  1. A.a
  2. B.abb
  3. C.baa
  4. D.b

Answer and explanation

Concise answer

abb

Why this is correct

The expression begins with a and then requires one or more repetitions of b. Therefore, abb is recognised.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions