InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
LR stands for ___________(a) Left to right(b) Left to right reduction(c) Right to left(d) Right most derivation and Left to right and a in reverseI got this question during an online interview.This interesting question is from Error Recovery in LR phase in division Error Handling of Compiler |
|
Answer» Correct ANSWER is (d) Right most DERIVATION and Left to right and a in reverse |
|
| 2. |
Which is the most powerful parser?(a) SLR(b) LALR(c) Canonical LR(d) Operator-precedenceThe question was posed to me by my college professor while I was bunking the class.The origin of the question is Error Recovery in LR phase topic in chapter Error Handling of Compiler |
|
Answer» CORRECT ANSWER is (c) CANONICAL LR The EXPLANATION: Canonical tops all other parsers. |
|
| 3. |
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 terminalsThe question was asked in my homework.My question is based upon Error Recovery in LR phase topic in section Error Handling of Compiler |
|
Answer» Right option is (B) All of the mentioned |
|
| 4. |
Recursive descent parsing is an example of ____________(a) Top down parsing(b) Bottom up parsing(c) Predictive parsing(d) None of the mentionedI had been asked this question in exam.This intriguing question comes from Error Recovery in LR phase in chapter Error Handling of Compiler |
|
Answer» CORRECT CHOICE is (a) TOP down parsing To EXPLAIN: Top down is the ANSWER. |
|
| 5. |
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 mentionedI got this question in examination.My question is from Error Recovery in LR phase in section Error Handling of Compiler |
|
Answer» The correct ANSWER is (c) CFG is not LR & Ambiguous GRAMMAR can never be LR |
|
| 6. |
The grammar S → aSa | bS | c is?(a) LL(1) but not LR(1)(b) LR(1) but not LR(1)(c) Both LL(1) but not LR(1) & LR(1) but not LR(1)(d) None of the mentionedI had been asked this question in an interview for job.The query is from Error Recovery in LR phase in section Error Handling of Compiler |
|
Answer» Correct OPTION is (c) Both LL(1) but not LR(1) & LR(1) but not LR(1) |
|
| 7. |
When will the relationship between ‘’ be |
|
Answer» The correct answer is (d) Undefined |
|