Which FSA concept is used in the compiler?

2021

Which FSA concept is used in the compiler?

  1. A.

    Code optimization

  2. B.

    Code generation

  3. C.

    Lexical analysis

  4. D.

    Parser

  5. E.

    Question not attempted

Attempted by 137 students.

Show answer & explanation

Correct answer: C

Finite State Automata (FSA) are used in the lexical analysis phase of a compiler to recognize patterns (tokens) like identifiers, keywords, etc.
⇒ Hence, FSA is used in Lexical analysis

Explore the full course: Bpsc