Computer Science EngineeringHardISRO SC

A scanner uses maximal munch with identifiers [a-z_][a-z0-9_]*, decimals digits(.digits)?, and operators/punctuators including <<=, <<, <=, <, ==, =, ++, +, ->, -, &&, &, !=, !, >>, >=, >, *, /, ; ( ) { } and comma. How many tokens does it produce for the input "n2>=3.14<m"?

  1. A. 6
  2. B. 4
  3. C. 7
  4. D. 5

Correct answer: D. 5

Tokens: n2 | >= | 3.14 | < | m => 5.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic