Compiler Design Quiz


Play this quiz that will help you to excel in Compiler Design certification exams, placements etc. This Compiler Design quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This test enables you to assess your knowledge of Compiler Design.

Take the Free Practice Test



Compiler Design MCQs

Practice Compiler Design MCQ Questions, which will help you to understand compiler related concepts and also helps you to prepare for placements, technical rounds, interviews, competitive exams etc.

Compiler Design Quiz

Try Free Compiler Design Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

Compiler Design Quiz

1. If the lexical analyzer finds a token invalid then?

it generates an exception
it generates an warning
it generates an error
reads the whole program

2. lexical analyzer is used to ?

remove whitespace
removing comments
breaks these syntaxes into a series of tokens
All of the above

3. Lexical analysis is the _______ phase of a compiler

first
second
third
fourth

4. When the lexical analyzer read the source-code, it scans the code?

line by line
word by word
letter by letter
reads the whole program

5. In how many types parsing is divided?

2
3
4
5

6. What is true about Syntax Directed Definitions?

Syntax Directed Definitions + Semantic rules = CFG
Syntax Directed Definitions + CFG = Semantic rules
CFG + Semantic rules = Syntax Directed Definitions
None of the above

7. Which of the following error is expected to recognize by semantic analyzer?

Type mismatch
Undeclared variable
Reserved identifier misuse.
All of the above

8. Which tool/computer program for generating lexical analyzers (scanners or lexers) written by Vern Paxson in C around 1987?

FLEX 
GLEX
CLEX
SLEX

9. Consider the production of the grammar S->AA A->aa A->bb Describe the language specified by the production grammar.

L = {aaaa,aabb,bbaa,bbbb}
L = {abab,abaa,aaab,baaa}
L = {aaab,baba,bbaa,bbbb}
L = {aaaa,abab,bbaa,aaab}

10. Substitution of values for names whose values are constant, is done in

local optimization
loop optimization
constant folding
None of the above

Results