Compilers Questions and Answers – Data Structure for Representing Parsing Table – 2

This set of Compilers online quiz 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

Answer: a
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

Answer: c
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

Answer: c
Explanation: The most powerful parser is Canonical LR
advertisement
advertisement

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

Answer: d
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

Answer: d
Explanation: In computer science, three-address is an intermediate code used by optimizing compilers to aid in the implementation of code-improving transformations.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. An intermediate code form is ___________
a) Postfix Notation
b) Syntax Trees
c) Three address code
d) All of the mentioned
View Answer

Answer: d
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.

advertisement

To practice all areas of Compilers for online Quizzes, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.