FAQ of Compiler contructions.
Click here: Syllabus of Compiler Constructions
1. Which of the following is the fastest logic?
a) TTL
b) ECL
c) CMOS
d) LSI
Explanation: In electronics, emitter-coupled logic (ECL) is a high-speed integrated circuit.
2. A bottom up parser generates __________
a) Right most derivation
b) Rightmost derivation in reverse
c) Leftmost derivation
d) Leftmost derivation in reverse
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
Explanation: ambiguous grammar has more than one parse tree.
4. 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 mentioned
Explanation: In computing, an optimizing compiler is a compiler that tries to minimize or maximize some attributes of an executable computer program.
5. 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 mentioned
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 which two cross coupled?
a) AND OR gates
b) AND gates
c) NAND and NOR gates
d) NAND gates
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
Explanation: More loops are added.
8. The optimization which avoids test at every iteration is?
a) Loop unrolling
b) Loop jamming
c) Constant folding
d) None of the mentioned
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
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
Explanation: Also known as shift reduce parser
- A. Ambiguous
- B. Unambiguous
- C. Regular
- D. All of these
- Answer: A
12.
_______ is the most general phase structured grammar.
A. Context sensitive
B. Regular
C. Context free
D. All of these
Answer: A
13.
Lexical analysis is about breaking a sequence of characters into______
A. Groups
B. Packets
C. Lines
D. Tokens
Answer: D
14.
What is the name of the process that determining whether a string of tokens can be generated by a grammar?
A. Analyzing
B. Recognizing
C. Translating
D. Parsing
Answer: D
15.
A _________ is a software utility that translates code written in higher language into a low level language.
A. Converter
B. Compiler
C. Text editor
D. Code optimizer
Answer: B
16.
________ is considered as a sequence of characters in a token.
A. Texeme
B. Pattern
C. Lexeme
D. Mexeme
Answer: C
17.
Compiler translates the source code to
A. Executable code
B. Machine code
C. Binary code
D. Both B and C
Answer: D
18. Which of the following groups is/are token together into semantic structures?
A. Syntax analyzer
B. Intermediate code generation
C. Lexical analyzer
D. Semantic analyzer
Answer: C
19. Compiler should report the presence of __________ in the source program, in translation process.A. Classes
B. Objects
C. Errors
D. Text
Answer: C
20. What is the output of lexical analyzer?
A. A parse tree
B. A list of tokens
C. Intermediate code
D. Machine code
Answer: B