← All topics
Quiz: TOC Basics: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. How many strings of length at most 3 are there over Σ = {0, 1} (including ε)?
- Q2. What is the difference between ε and ∅?
- Q3. Which machine recognises context-free languages?
- Q4. If L = {ab}, which string is in L?
- Q5. Why can't a regular expression match arbitrarily deeply nested brackets?
- Q6. What is the reverse of the string abb?
- Q7. Which statement about Σ and Σ⁺ is correct?
- Q8. If L₁ = {a, b} and L₂ = {c, d}, how many strings are in the concatenation L₁L₂?
- Q9. What does this print? (code)
- Q10. In the Chomsky hierarchy, which language is context-sensitive but not context-free?