Compilers Questions and Answers – Error Recovery in LR phase – 1

This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Error Recovery in LR phase – 1”.

1. Choose the correct statement.
a) CFG is not LR
b) Ambiguous Grammar can never be LR
c) CFG is not LR & Ambiguous Grammar can never be LR
d) None of the mentioned
View Answer

Answer: c
Explanation: Mentioned reason is true.

2. How is the parsing precedence relations defined?
a) None of the mentioned
b) All of the mentioned
c) To delimit the handle
d) Only for a certain pair of terminals
View Answer

Answer: b
Explanation: The reason why the precedence operations is performed.

3. When will the relationship between ‘+’ and ‘-’ be <?
a) For unary minus
b) Minus is right associative
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: c
Explanation: Both statements are true.

4. When will the relationship between ‘<’ and ‘>’ be <?
a) >
b) <
c) =
d) Undefined
View Answer

Answer: d
Explanation: Undefined. There is no existing relationship between the two.

Sanfoundry Global Education & Learning Series – Compilers.

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

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.