0% found this document useful (0 votes)
843 views3 pages

CD Online Bits

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 3

AUDISANKARA INSTITUTE OF TECHNOLOGY:: GUDUR

COMPILER DESIGN

1. Collection of alphabets is known as [ ]


a) Identifier b) language c) string d) grammar
2. What is the output of the syntax analyzer [ ]
a) Token b) string c) tree d) pattern
3. What does the semantic analysis do [ ]
a) Coercions b) corrections c) conversions d) both A and c
4. The software systems that do translations are called [ ]
a) Compiler b) Interpreter c) Translator d) all of them
5. Which is defined as head of the grammar [ ]
a) Operators b) non terminals c) terminals d) identifiers
6. Syntax analyzer is also known as [ ]
a) Symbol table b) scanner c) parser d) lexeme
7. What is the duty of a lexical analyzer [ ]
a) Removing white spaces b) identifying tokens c) removing comments d)All of the above
8. The software systems that do translations are called [ ]
a) Compiler b) Interpreter c) Translator d) all of them
9. A grammar that produces more than one parse tree for some sentence is called
a) Ambiguous b) Unambiguous c) Regular d)both A and C
10. What is the parsing generator tool [ ]
a) LEX b) FLEX c) YACC d) both A and B
11. What is the scanner generator tool [ ]
a) LEX b) FLEX c) YACC d) both A and B
12. What is the output of scanner [ ]
a) String b) lexeme c) pattern d) token
13. Which of the following is a top down parsing [ ]
a) Predictive parsing b) SLR c) SR parsing d)both A and B
14. What is LALR parsing [ ]
a) Predictive b) top down c) bottom up d) both A and B
15. What is a L in LL(K) parsing [ ]
a) Long range b) look ahead c) Limit string d) all of them
16. A bottom up parser generates [ ]
a) Right most derivation b) Right most derivation in reverse
c) Left most derivation d) Left most derivation in reverse
17. An optimizer Compiler [ ]
a) Is optimized to occupy less space b) Optimize the code
c) Both of the mentioned d) None of the mentioned
18. What is the output of compiler [ ]
a) Machine code b) intermediate code c) generator code d)both B and C
19. Intermediate code is the output of the [ ]
a) Synthesis part b) analysis part c) compiler d)all of them
20. Operator precedence must have --------------in the grammar [ ]
a) Operator b) preceder c) non terminals side by side d)all of them

21.consider the grammar where p,q,r are not terminals and r,s,t are terminals [ ]
a)p_>QR b)p_Q s R C)P_>e d)p_QtRr
22.In a compiler ---------------------checks every character of the source text. [ ]
a) The lexical analyzer b) The syntax analyzer
c) The code generator d) The code optimizer
23. Why is the code optimizations are carried out on the intermediate code? [ ]
a) Because for optimization information from the front end cannot be used
b) Because program is more accurately analyzed on intermediate code than on machine code.
c) Because for optimization information from data flow analysis cannot be used
d) Because they enhance the portability of the compiler to the other target processor.
24. In a compiler, the data structure responsible for the management of information about [ ]
variables and their attributes is
a) Semantic stack b) Parser table c) Symbol table d) Abstract syntax-tree
25. Some code optimizations are carried out on the intermediate code because [ ]
a) they enhance the portability of the compiler to other target processors
b) program analysis is more accurate on intermediate code than on machine code
c) the information from dataflow analysis cannot otherwise be used for optimization
d) the information from the front end cannot otherwise be used for optimization
26. Which one of the following is false? [ ]
a) The code contains loop invariant computation
b) There is scope of common sub-expression elimination in this code
c) There is scope of strength reduction in this code
d) There is scope of dead code elimination in this code
27. Optimization of program that works within a single basic block is called [ ]
a) Local optimization b) Global optimization c) Loop un-controlling d)Loop controlling
28. The average time required to reach a storage location in memory and obtain its contents is [ ]
called the _____
a) Seek time b) Turnaround time c) Access time d) Transfer time
29. An intermediate code form is [ ]
a) Postfix Notation b) Syntax Trees c) Three address d) All of the mentioned
30. The graph that shows basic blocks and their successor relationship is called [ ]
a) Dag b) Flow Graph c) Control Graph d) Hamilton Graph
Answers
1-A
2-D
3-D
4-C
5-A
6-C
7-B
8-C
9-D
10-B
11-C
12-D
13-A
14-C
15-B
16-C
17-A
18-B
19-A
20-B
21-A/C
22-A
23-B
24-C
25-A
26-D
27-A
28-C
29-D
30-B

You might also like