This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 368 binary equivalents is
8=1000
6=0110
3=0011
So 1101101000.
8. AB+(A+B)’ is equivalent to __________
a) A?B
b) A+B
c) (A+B)A
d) (A+B)B
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: Run time, runtime or execution time is the time during which a program is running (executing).
Sanfoundry Global Education & Learning Series – Compilers.
To practice all areas of Compilers, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Check Compiler Design Books
- Apply for Computer Science Internship
- Check Computer Science Books
- Practice MCA MCQs
- Practice Computer Science MCQs