Explore topic-wise MCQs in Compilers.

This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Compilers knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the output of a lexical analyzer?

A. Machine Code
B. Intermediate Code
C. Stream of Token
D. Parse Tree
Answer» D. Parse Tree
2.

Which of the lexical analyser can handle Unicode?

A. Java CC
B. JFLex
C. Quex
D. All of the mentioned
Answer» E.
3.

Which one is a lexer Generator?

A. ANTLR
B. DRASTAR
C. FLEX
D. All of the mentioned
Answer» E.
4.

Lexers are often generated by a lexer generator, same as parser generators.

A. True
B. False
Answer» B. False
5.

What goes over the characters of the lexeme to produce value?

A. Scanner
B. Parser
C. Evaluator
D. Lexical generator
Answer» B. Parser
6.

It has encoded within it information on the possible sequences of characters that can be contained within any of the tokens it handles. The mentioned function is performed by?

A. Scanner
B. Parser
C. Syntactic Analyser
D. All of the mentioned
Answer» B. Parser
7.

Two Important lexical categories are __________

A. White Space
B. Comments
C. None of the mentioned
D. White Space & Comments
Answer» E.
8.

Which grammar defines Lexical Syntax?

A. Regular Grammar
B. Syntactic Grammar
C. Context free Grammar
D. Lexical Grammar
Answer» E.
9.

When expression sum=3+2 is tokenized then what is the token category of 3?

A. Identifier
B. Assignment operator
C. Integer Literal
D. Addition Operator
Answer» D. Addition Operator
10.

The process of forming tokens from an input stream of characters is called __________

A. Liberalisation
B. Characterisation
C. Tokenization
D. None of the mentioned
Answer» D. None of the mentioned