CD Quiz-I
CD Quiz-I
Roll No-
Subject with Code: Compiler Design (RCS6C002) Course & Branch: B. Tech. & CSE
Year & Semester: 3rd & VI
2. Which of the following error can a compiler check? [2 marks] [CO1] [L2]
a) Syntax Error
b) Logical Error
c) Both Logical and Syntax Error
d) Compiler cannot check errors
3. Characters are grouped into tokens in which of the following phase of the compiler
design? [2 marks] [CO1] [L2]
a) Code generator
b) Lexical analyzer
c) Parser
d) Code optimization
6. Which of the following derivations does a top-down parser use while parsing an input
string? [2 marks] [CO2] [L2]
a) Leftmost derivation
b) Leftmost derivation in reverse
c) Rightmost derivation
d) Rightmost derivation in reverse
7. Given the following expression grammar: [2 marks] [CO2] [L2]
E -> E * F | F+E | F
F -> F-F | id
which of the following is true?
9. The grammar A → AA | (A) | e is not suitable for predictive-parsing because the grammar
is? [2 marks] [CO2] [L2]
a) Ambiguous
b) Left recursive
c) Right recursive
d) An operator grammar