Computer Science EngineeringVery hard
By the maximal munch rule, how many tokens does a C scanner find in x = y+++z; ?
- A. 5
- B. 6
- C. 8
- D. 7
Correct answer: D. 7
The tokens are x, =, y, ++, +, z and ;, giving 7.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- When several lexemes could be matched by different Lex rules, Lex picks
- The language {a^n b^m | n != m} is
- The language denoted by the regular expression empty-set star (the Kleene star of the empty set) is
- The minimal DFA over {a, b} accepting strings whose length is divisible by 3 has how many states?
- Adding extra tapes to a Turing machine
- Savitch's theorem implies that