250+ TOP MCQs on Error Recovery in LR phase and Answers

Compilers Multiple Choice Questions & Answers (MCQs) on “Error Recovery in LR phase”.

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

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

Answer: b
Clarification: 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

Answer: c
Clarification: Both statements are true.

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *