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.
| 51. |
What is terminal table?(a) Contains all constants in the program(b) Is a permanent table of decision rules in the form of patterns for matching with the uniform symbol table to discover syntactic structure(c) Consist of a full or partial list of the token is as they appear in the program created by lexical analysis and used for syntax analysis and interpretation(d) Is a permanent table which lists all keywords and special symbols of the language in symbolic formThe question was asked during an interview for a job.This question is from LR Parser in portion Bottom Up Parsing of Compiler |
|
Answer» RIGHT answer is (d) Is a permanent table which lists all KEYWORDS and special symbols of the language in symbolic form The BEST explanation: A permanent database that has entry for each terminal symbols such as arithmetic operators, keywords, punctuation characters such as ‘;’, ‘,’etc FIELDS: Name of the SYMBOL. |
|
| 52. |
The construction of the canonical collection of the sets of LR (1) items are similar to the construction of the canonical collection of the sets of LR (0) items. Which is an exception?(a) Closure and goto operations work a little bit different(b) Closure and goto operations work similarly(c) Closure and additive operations work a little bit different(d) Closure and associatively operations work a little bit differentThis question was posed to me in final exam.My question comes from LR Parser in chapter Bottom Up Parsing of Compiler |
|
Answer» The correct choice is (a) Closure and GOTO operations work a little BIT different |
|
| 53. |
An intermediate code form is __________(a) Postfix notation(b) Syntax Trees(c) Three Address code(d) All of the mentionedI got this question at a job interview.This intriguing question comes from Handle of Right sentinel Grammar topic in division Bottom Up Parsing of Compiler |
|
Answer» Right choice is (d) All of the mentioned |
|
| 54. |
The linker __________(a) Is similar to interpreter(b) Uses source code as its input(c) Is required to create a load module(d) None of the mentionedI have been asked this question in final exam.This key question is from Bottom-Up Parsing-2 topic in portion Bottom Up Parsing of Compiler |
|
Answer» Right option is (c) Is required to CREATE a load module |
|
| 55. |
Scissoring enables __________(a) A part of data to be displayed(b) Entire data to be displayed(c) None of the mentioned(d) No data to be displayedI had been asked this question in unit test.My enquiry is from Bottom-Up Parsing-2 in portion Bottom Up Parsing of Compiler |
|
Answer» CORRECT choice is (a) A PART of data to be displayed The EXPLANATION is: DISPLAYS only some part of the data. |
|
| 56. |
A latch is constructed using which two cross coupled?(a) AND OR gates(b) AND gates(c) NAND and NOR gates(d) NAND gatesI had been asked this question in an international level competition.This is a very interesting question from Bottom-Up Parsing-2 topic in division Bottom Up Parsing of Compiler |
|
Answer» Correct option is (d) NAND gates |
|
| 57. |
The action of parsing the source program into proper syntactic classes is called __________(a) Syntax Analysis(b) Lexical Analysis(c) Interpretation analysis(d) General Syntax AnalysisI have been asked this question in an interview for internship.My question is taken from Bottom-Up Parsing-1 in division Bottom Up Parsing of Compiler |
|
Answer» RIGHT answer is (b) LEXICAL Analysis For EXPLANATION: Conversion of characters to TOKENS. |
|
| 58. |
Assume that the SLR parser for a grammar G has n1 states and the LALR parser for G has n2 states. Hence which one is true?(a) N1 is necessarily less than n2(b) N1 is necessarily equal to n2(c) N1 is necessarily greater than n2(d) None of the mentionedI have been asked this question during an interview for a job.My question comes from Handle of Right sentinel Grammar topic in division Bottom Up Parsing of Compiler |
|
Answer» Correct OPTION is (b) N1 is NECESSARILY EQUAL to n2 |
|
| 59. |
In a bottom up evaluation of a syntax direction definition, inherited attributes can __________(a) Always be evaluated(b) Be evaluated only if the definition is L –attributed(c) Evaluation only done if the definition has synthesized attributes(d) None of the mentionedI got this question by my college director while I was bunking the class.I want to ask this question from Handle of Right sentinel Grammar in division Bottom Up Parsing of Compiler |
|
Answer» CORRECT answer is (c) Evaluation only DONE if the DEFINITION has synthesized attributes Explanation: Bottom-up PARSING identifies and processes the text’s lowest-level, before its mid-level structures, and the highest-level overall structure to last are left. |
|
| 60. |
A synthesized attribute is an attribute whose value at a parse tree node depends on __________(a) Attributes at the siblings only(b) Attributes at parent node only(c) Attributes at children nodes only(d) None of the mentionedThis question was posed to me during a job interview.My enquiry is from Handle of Right sentinel Grammar in portion Bottom Up Parsing of Compiler |
|
Answer» The correct OPTION is (c) ATTRIBUTES at children nodes only |
|
| 61. |
Input to code generator is __________(a) Source code(b) Intermediate code(c) Target code(d) All of the mentionedI have been asked this question during a job interview.This is a very interesting question from Handle of Right sentinel Grammar topic in section Bottom Up Parsing of Compiler |
|
Answer» The correct answer is (B) INTERMEDIATE CODE |
|
| 62. |
An optimizer Compiler __________(a) Is optimized to occupy less space(b) Is optimized to occupy less space & Optimize the code(c) Optimize the code(d) None of the mentionedI had been asked this question in an interview for job.This is a very interesting question from Bottom-Up Parsing-2 in portion Bottom Up Parsing of Compiler |
|
Answer» Right answer is (d) NONE of the mentioned |
|
| 63. |
An optimizing compiler __________(a) Is optimized to occupy less space(b) Is optimized to take less time for execution(c) Optimized the code(d) None of the mentionedThis question was addressed to me in an online quiz.The origin of the question is Handle of Right sentinel Grammar topic in section Bottom Up Parsing of Compiler |
|
Answer» Right answer is (c) Optimized the CODE |
|
| 64. |
When ß (in the LR(1) item A -> ß.a,a) is not empty, the look-head _________(a) Will be affecting(b) Does not have any affect(c) Shift will take place(d) Reduction will take placeI got this question in class test.Enquiry is from LR Parser topic in section Bottom Up Parsing of Compiler |
|
Answer» Correct CHOICE is (B) Does not have any affect |
|
| 65. |
Shift reduce parsers are __________(a) Top down Parser(b) Bottom Up parser(c) May be top down or bottom up(d) None of the mentionedThis question was posed to me during an interview.Question is from Bottom-Up Parsing-2 in chapter Bottom Up Parsing of Compiler |
|
Answer» The CORRECT option is (b) BOTTOM Up PARSER |
|
| 66. |
A grammar that produces more than one parse tree for some sentence is called __________(a) Ambiguous(b) Unambiguous(c) Regular(d) None of the mentionedI had been asked this question in an interview for job.Enquiry is from Bottom-Up Parsing-2 in chapter Bottom Up Parsing of Compiler |
|
Answer» RIGHT choice is (a) Ambiguous To elaborate: ambiguous GRAMMAR has more than ONE parse TREE. |
|
| 67. |
System program such as compiler are designed so that they are _________(a) Re-enterable(b) Non reusable(c) Serially usable(d) None of the mentionedThis question was addressed to me during an online interview.The origin of the question is LR Parser topic in chapter Bottom Up Parsing of Compiler |
|
Answer» Correct answer is (a) Re-enterable |
|
| 68. |
Which of the following is incorrect for the actions of A LR-Parser I) shift s ii) reduce A->ß iii) Accept iv) reject?(a) Only I)(b) I) and ii)(c) I), ii) and iii)(d) I), ii) , iii) and iv)The question was posed to me during an online exam.I would like to ask this question from LR Parser in section Bottom Up Parsing of Compiler |
|
Answer» Right CHOICE is (c) I), ii) and III) |
|
| 69. |
An LR-parser can detect a syntactic error as soon as __________(a) The parsing starts(b) It is possible to do so a left-to-right scan of the input(c) It is possible to do so a right-to-left scan of the input(d) Parsing endsI have been asked this question during an online interview.Question is taken from LR Parser in chapter Bottom Up Parsing of Compiler |
|
Answer» The correct ANSWER is (b) It is POSSIBLE to do so a left-to-right scan of the input |
|
| 70. |
Shift reduce parsers are __________(a) Top down parser(b) Bottom up parser(c) Maybe both(d) None of the mentionedThe question was asked by my school principal while I was bunking the class.Origin of the question is Handle of Right sentinel Grammar in chapter Bottom Up Parsing of Compiler |
|
Answer» The correct OPTION is (b) Bottom up parser |
|
| 71. |
Running time of a program depends on __________(a) Addressing mode(b) Order of computations(c) The usage of machine idioms(d) All of the mentionedThis question was addressed to me during an interview for a job.I want to ask this question from Bottom-Up Parsing-1 in division Bottom Up Parsing of Compiler |
|
Answer» Correct option is (d) All of the mentioned |
|
| 72. |
Which of the following actions an operator precedence parser may take to recover from an error?(a) Insert symbols onto the stack(b) Delete symbols from the stack(c) Inserting or deleting symbols from the input(d) All of the mentionedI got this question during an interview.Query is from Handle of Right sentinel Grammar in section Bottom Up Parsing of Compiler |
|
Answer» Correct option is (d) All of the mentioned |
|
| 73. |
In an absolute loading scheme which loader function is accomplished by assembler?(a) Re-allocation(b) Allocation(c) Linking(d) LoadingThis question was addressed to me in examination.Question is from Bottom-Up Parsing-1 topic in chapter Bottom Up Parsing of Compiler |
|
Answer» The CORRECT CHOICE is (a) Re-allocation |
|
| 74. |
A bottom up parser generates __________(a) Right most derivation(b) Right most derivation in reverse(c) Left most derivation(d) Left most derivation in reverseThis question was addressed to me in a job interview.The question is from Handle of Right sentinel Grammar topic in division Bottom Up Parsing of Compiler |
|
Answer» Correct answer is (B) Right most derivation in reverse |
|