A scanner that must handle both /* */ and // comments will
Answer: C
Neither form nests, so both are regular and can be matched by patterns. Start conditions are a convenient way to switch the scanner into a mode in which only the closing delimiter matters. Without modes the patterns would have to describe every possible comment body explicitly.
Please log in or register to report this question.