Computer Science EngineeringVery hard

By the maximal munch rule, how many tokens does a C scanner find in x = y+++z; ?

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

Correct answer: D. 7

The tokens are x, =, y, ++, +, z and ;, giving 7.

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

Exams that ask this topic