# UGCNET-June2010-II: 35

2.6k views

Which of the following is used for grouping of characters into tokens (in a computer) ?

1. A parser
2. Code optimizer
3. Code generator
4. Scanner

recategorized

Answer is option (D) Scanner. A scanner or lexical analyzer reads the program from left to right, organize them into tokens and pass those tokens to the next level.

Ans: D Scanner is also known as lexical analyzer

scanner (lexical analyser)

## Related questions

1
349 views
Which of the following is the most general phase structured grammar ? Regular Context-sensitive Context free None of the above
1 vote
How many tokens will be generated by the scanner for the following statement ? $x = x ∗ (a + b) - 5$; $12$ $11$ $10$ $07$