0% found this document useful (0 votes)
25 views2 pages

CD Quiz-I

This document is a quiz for the Compiler Design course at Synergy Institute of Engineering and Technology, consisting of 10 multiple-choice questions worth a total of 20 marks. The quiz assesses knowledge on topics such as tokens, compiler errors, parsing techniques, and grammar properties. Students are required to answer all questions within a duration of 30 minutes.

Uploaded by

pritisahu5254
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

CD Quiz-I

This document is a quiz for the Compiler Design course at Synergy Institute of Engineering and Technology, consisting of 10 multiple-choice questions worth a total of 20 marks. The quiz assesses knowledge on topics such as tokens, compiler errors, parsing techniques, and grammar properties. Students are required to answer all questions within a duration of 30 minutes.

Uploaded by

pritisahu5254
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SYNERGY INSTITUTE OF ENGINEERING AND TECHNOLOGY, DHENKANAL

Near NH-55, Banamali Prasad – 759001


Quiz-I

Full Marks-20 Duration-30 Min

Name- Registration No-

Roll No-
Subject with Code: Compiler Design (RCS6C002) Course & Branch: B. Tech. & CSE
Year & Semester: 3rd & VI

Answer All Questions


Tick the Correct Answer/Answers

Course Outcome Total Marks Marks Secured Signature of Evaluator


CO1 10
CO2 10

1. An individual token is called ________ [2 marks] [CO1] [L2]


a) Lexeme
b) Lex
c) Lexeme & Lex
d) None of the mentioned

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

4. Which of the following can detect an error if a programmer by mistake writes


multiplication instead of division? [2 marks] [CO1] [L2]
a) Interpreter
b) Compiler or interpreter test
c) Compiler
d) None of the mentioned

5. An NFA’s transition function returns ________ [2 marks] [CO1] [L2]


a) A Boolean value
b) A state
c) A set of states
d) An edge

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?

a) * has higher precedence than +


b) – has higher precedence than *
c) + and — have same precedence
d) + has higher precedence than *

8. Which one of the following is a top-down parser? [2 marks] [CO2] [L2]


a) Recursive descent parser
b) Operator precedence parser
c) An LR(k) parser
d) An LALR(k) parser

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

10. A bottom up parser generates __________ [2 marks] [CO2] [L2]


a) Right most derivation
b) Rightmost derivation in reverse
c) Leftmost derivation
d) Leftmost derivation in reverse

You might also like