Compiler Design Quiz1

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

COMPILER DESIGN QUIZ1

1. A optimizing compiler B. Context free


A. Is optimized to take less time for execution C. Context sensitive
B. Optimized the code D. All of these
C. Is optimized to occupy less space
D. None of the mentioned 12. A _________ is a software utility that translates code written
in higher language into a low level language.
2. Which of the following actions an operator precedence parser A. Text editor
may take to recover from an error? B. Compiler
A. Delete symbols from the stack C. Converter
B. Insert symbols onto the stack D. Code optimizer
C. Inserting or deleting symbols from the input
D. All of the mentioned 13. The graph that shows basic blocks and their successor
relationship is called
3. Shift reduce parsers are A. Flow graph
A. Bottom up parser B. control graph
B. Top down parser C. Hamiltonion graph
C. Top down parserMaybe both D. DAG
D. None of the mentioned
14. When a computer is first turned on or resrarted, a special type
4. Which of the following is used for grouping of characters into of absolute loader is executed called
tokens? A. Boot strap loader
A. Parser B. " Compile and GO " loader
B. Code generator C. Relating loader
C. Lexical analyser D. Boot loader
D. Code generator
15. A self-relocating program is one which
5. In a compiler, keywords of a language are recognized during - A. consists of a program and relevant information for its
A. the code generation relocation
B. parsing of the program B. cannot be made to execute in any area of storage other
C. the lexical analysis of the program than the one designated for it at the time of its coding or
D. dataflow analysis translation
C. can itself perform the relocation of its address sensitive
6. Compiler translates the source code to portions
A. Machine code D. all of these
B. Binary code
C. Executable code 16. Scissoring enables -
D. Both 1 and 2 A. entire data to be displayed
B. full data display on full area of screen
7. What is the output of lexical analyzer? C. a part of data to be displayed
A. A list of tokens D. no data to be displayed
B. Intermediate code
C. A parse tree 17. which is the permanent data base in the geneal model of
D. Machine code Compiler ?
A. identifier table
8. How many parts of compiler are there? B. literal table
A. 8 C. terminal table
B. 4 D. source code
C. 2
D. 1 18. which of the following parsers is the most powerful ?
A. Operator - precedence
9. ......................is a process of finding a parse tree for a string of B. LALR
tokens. C. SLR
A. Analysing D. Canonical LR
B. Recognizing
C. Tokenizing 19. What is the output of lexical analyzer?
D. Parsing A. A list of tokens
B. A parse tree
10. Compiler can check ________ error. C. Intermediate code
A. Syntax D. Machine code
B. Content
C. Logical
D. Both A and B

11. ......................is the most general phase structured grammar.


A. Regular

You might also like