This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Data Structure for Representing Parsing Table – 2”.
1. In operator precedence parsing whose precedence relations are defined _________
a) For all pair of non-terminals
b) For all pair of terminals
c) To delimit the handle
d) None of the mentioned
View Answer
Explanation: There are two important properties for these operator precedence parsers is that it does not appear on the right side of any production and no production has two adjacent no terminals.
2. LR parsers are attractive because _________
a) It can be constructed to recognize CFG corresponding to almost all programming constructs
b) It does not backtrack
c) It can be constructed to recognize CFG corresponding to almost all programming constructs & It does not backtrack
d) None of the mentioned
View Answer
Explanation: These above mentioned are the reasons why LR parser is considered to be attractive
3. Which is the most powerful parser?
a) SLR
b) LALR
c) Canonical LR
d) Operator Precedence
View Answer
Explanation: The most powerful parser is Canonical LR
4. ( Z,* ) be a structure, and * is defined by n * m =maximum (n, m) Which of the following statements is true for ( Z, * )?
a) ( Z,* ) is a monoid
b) ( Z,* ) is an algebraic group
c) ( Z,* ) is a group
d) None of the mentioned
View Answer
Explanation: It is neither a monoid nor a simple group nor algebraic group
5. The address code involves _____________
a) Exactly 3 address
b) At most Three address
c) No unary operators
d) None of the mentioned
View Answer
Explanation: In computer science, three-address is an intermediate code used by optimizing compilers to aid in the implementation of code-improving transformations.
6. An intermediate code form is ___________
a) Postfix Notation
b) Syntax Trees
c) Three address code
d) All of the mentioned
View Answer
Explanation: Intermediate code generator takes input from its predecessor phase, semantic analyzer, in the form of an annotated syntax tree.
Sanfoundry Global Education & Learning Series – Compilers.
To practice all areas of Compilers, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Practice MCA MCQs
- Apply for Computer Science Internship
- Check Compiler Design Books
- Check Computer Science Books
- Practice Computer Science MCQs