250+ TOP MCQs on Bottom-Up Parsing and Answers

Compilers Multiple Choice Questions & Answers (MCQs) on “Bottom-Up Parsing”.

1. Inherited attribute is a natural choice in ___________
a) Variable declarations record is maintained
b) L values and R values
c) All of the mentioned
d) None of the mentioned

Answer: a
Clarification: It keeps track of variable.

2. YACC builds up __________
a) SLR parsing table
b) Canonical LR parsing table
c) LALR parsing table
d) None of the mentioned

Answer: c
Clarification: It is a parser generator.

3. In an absolute loading scheme which loader function is accomplished by assembler?
a) Re-allocation
b) Allocation
c) Linking
d) Loading

Answer: a
Clarification: Large number variables onto a small number of CPU register.

4. A parser with the valid prefix property is advantageous because it __________
a) Detects errors
b) None of the mentioned
c) Errors are passed to the text phase
d) All of the mentioned

Answer: c
Clarification: Advantage for a valid prefix property.

5. 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 Analysis

Answer: b
Clarification: Conversion of characters to tokens.

6. Relocating bits used by relocating loader are specified by __________
a) Relocating loader itself
b) Linker
c) Assembler
d) Macro Processor

Answer: b
Clarification: Takes an object files and combines them into a single executable file, library file, or another object file.

7. What is the binary equivalent of the decimal number 368?
a) 10111000
b) 110110000
c) 111010000
d) 111100000

Answer: b
Clarification: 368 binary equivalents is
So 1101101000.

8. AB+(A+B)’ is equivalent to __________
a) A?B
b) A+B
c) (A+B)A
d) (A+B)B

Answer: a
Clarification: It is equivalent to A? B.

9. A top down parser generates __________
a) Rightmost Derivation
b) Right most derivation in reverse
c) Left most derivation
d) Left most derivation in reverse

Answer: c
Clarification: Top-down parsing is a parsing strategy where one first looks at the highest level of the parse tree and works down the parse tree by using the rewriting rules of a formal grammar.

10. Running time of a program depends on __________
a) Addressing mode
b) Order of computations
c) The usage of machine idioms
d) All of the mentioned

Answer: d
Clarification: Run time, runtime or execution time is the time during which a program is running (executing).

Leave a Reply

Your email address will not be published.