Fdocuments - in Compiler Objective
Fdocuments - in Compiler Objective
Answer B
Answer C
Answer C
4. Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two
zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of
length less than 3 are also in the language. A partially completed DFA that accepts this language
is shown below.
A A B B
C C D D
Answer D
Answer D
A Regular B Context-sensitive
Answer B
Answer A
Answer A
Answer B
Answer A
Answer A
A Can B Cannot
Answer B
A 2 B 3
C 4 D 5
Answer D
14. If two finite state machines are equivalent they should have the same number of
A States B Edges
Answer D
A n states B n + 1 states
C n + 2 states D 2n states
Answer B
Answer C
17. Which of the following permanent database that has an entry for each terminal symbol ?
Answer C
Answer A
19. The equivalent grammar corresponding to the grammar G : S®aA, A®BB, B®aBb|Î is
Answer D
Answer D
UNIT-2
1.______obtains string of tokens from lexical analyzer?
Ans: parser
5. Define Derivation?
6.Define Grammer?
Ans.Set of rules
Ans:Sentential form
Ans:Synthesized
Ans.inherited
11_______describes meaning of a program?
Ans:semantic
Ans.True
Ans:Bottom up parsing
Ans:Lex
Ans:T
UNIT-4
1. _________or scanning is the process where the stream of characters making up the source
program is read from left to right and grouped into tokens.
Answer A
Answer D
3. The lexical analyzer takes_________as input and produces a stream of_______as output.
Answer A
4. The action of parsing the source program into proper syntactic classes is called
Answer B
A To parse the source program into the basic elements or tokens of the language
D All of these
Answer D
Answer C
Answer C
Answer B
Answer B
A SLR B LALR
Answer C
C LALR D SLR
Answer B
12. A parser with the valid prefix property is advantageous because it
C Limits the amount of erroneous output passed to the text phase D All of
these
Answer C
13. A grammar that produces more than one parse tree for some sentence is called
A Ambiguous B Unambiguous
Answer A
Answer D
Answer A
Answer A
Answer D
Answer C
Answer C
Answer C
UNIT-6
C Both A and B
D None of these
Answer A
Answer C
Answer D
Answer D
Answer D
6. Intermediate code generation phase gets input from
Answer C
7. The graph that shows basic blocks and their successor relationship is called
Answer B
Answer B
Answer B
Answer A
D All of these
Answer D
A A device B Timer
Answer D
D All of these
Answer A
Answer D
Answer D
17. Whether a given pattern constitutes a token or not depends on the
Answer C
Answer A
Answer A
A Is optimized to occupy less space B Is optimized to take less time for execution
Answer D
UNIT-7
Answer D
Answer B
Answer C
Answer A
Answer C
6. A compiler for a high level language that runs on one machine and produce code for different
machine is called
A Optimizing compiler B One pass compiler
Answer C
Answer C
Answer D
9. The linker
A is similar to interpreter
Answer C
A Hardware
B Compiler
C Registers
A sub program
B a complete program
C a hardware portion
D relative coding
Answer A
A re-allocation
B allocation
C linking
D loading
Answer A
A LL grammar
B Ambiguous grammar
C LR grammar
Answer C
A Re-allocation
B Allocation
C Linking
D Loading
Answer D
15. A compiler that runs on one machine and produces code for a different machine is called
A Cross compilation
Answer A
16. Which of the following is used for grouping of characters into tokens (in a computer)
A A parser
B Code optimizer
C Code generator
D Scanner
Answer D
Answer A
B. constant folding
C. local optimization
D. algorithm optimization
Answer B
Answer C
20. Optimization connected with x:x+0 is
C. peephole only
Answer A
UNIT-8
Answer A
Answer B
Answer Ds
Answer D
Answer B
Answer B
Answer A
Answer A
Answer B
Answer A
11. The ____ attribute holds the sequence of three address statements
A. Place
B. Code
C. Symbol
D. Mode
Answer B
Answer D
Answer A
Answer A
Answer B
17. Isf attributes of the child depends on the attributes of parent node then it is ____
attributes.
A. TAC
B. Synthesized
C. Inherited
D. Directed
Answer C
18. Isf attributes of the parent depends on its children then it is ____ attributes.
A. TAC
B. Synthesized
C. Inherited
D. Directed
Answer D
Answer A
Answer B
I