Compilers Questions and Answers – Automatic Error Recovery in YACC – 2

«
»

This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Automatic Error Recovery in YACC – 2”.

1. Which of the following is the fastest logic ?
a) TTL
b) ECL
c) CMOS
d) LSI
View Answer

Answer: b
Explanation: In electronics, emitter-coupled logic (ECL) is a high-speed integrated circuit.
advertisement

2. A bottom up parser generates
a) Right most derivation
b) Rightmost derivation in reverse
c) Leftmost derivation
d) Leftmost derivation in reverse
View Answer

Answer: b
Explanation: This corresponds to starting at the leaves of the parse tree also known as shift-reduce parsing.

3. A grammar that produces more than one parse tree for some sentence is called
a) Ambiguous
b) Unambiguous
c) Regular
d) None of the mentioned
View Answer

Answer: a
Explanation: Ambiguous grammar has more than one parse tree.

4. An optimizer Compiler
a) Is optimized to occupy less space
b) Both of the mentioned
c) Optimize the code
d) None of the mentioned
View Answer

Answer: d
Explanation: In computing, an optimizing compiler is a compiler that tries to minimize or maximize some attributes of an executable computer program.
advertisement

5. The linker
a) Is similar to interpreter
b) Uses source code as its input
c) I s required to create a load module
d) None of the mentioned
View Answer

Answer: c
Explanation: It is a program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another object file.

6. A latch is constructed using two cross coupled
a) AND OR gates
b) AND gates
c) NAND and NOR gates
d) NAND gates
View Answer

Answer: d
Explanation: It has two inputs and one output.

7. Pee Hole optimization
a) Loop Optimization
b) Local Optimization
c) Constant folding
d) Data Flow analysis
View Answer

Answer: a
Explanation: More loops are added.
advertisement

8. The optimization which avoids test at every iteration is
a) Loop unrolling
b) Loop jamming
c) Constant folding
d) None of the mentioned
View Answer

Answer: a
Explanation: Execution speed is enhanced by sacrificing bits.

9. 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 displayed
View Answer

Answer: a
Explanation: Displays only some part of the data.

10. Shift reduce parsers are
a) Top down Parser
b) Bottom Up parser
c) May be top down or bottom up
d) None of the mentioned
View Answer

Answer: b
Explanation: Also known as shift reduce parser.
advertisement

Sanfoundry Global Education & Learning Series – Compilers.
To practice all areas of Compilers, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn