Compiler Design Set 4
Free Online Best Compiler Design MCQ Questions for improve your basic knowledge of Compiler Design. This Compiler Design set 4 test that contains 25 Multiple Choice Questions with 4 options. You have to select the right answer to a question.
Start
Congratulations - you have completed Compiler Design Set 4.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
The optimization which avoids test at every iteration is____
A | Loop unrolling |
B | Loop jamming |
C | Constant folding |
D | None of Above |
Question 2 |
Synthesized attribute can be easily simulated by a____
A | LR grammar |
B | LL grammar |
C | Ambiguous grammar |
D | None of Above |
Question 3 |
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 |
Question 4 |
Given the following expression grammar:
E -> E * F | F+E | F
F -> F-F | id
which of the following is true?
A | * has higher precedence than + |
B | – has higher precedence than * |
C | #ERROR! |
D | #ERROR! |
Question 5 |
Which of the following grammar rules violate the requirements of an operator grammar?
(i) P -> QR
(ii) P -> QsR
(iii) P -> ?
(iV) P -> QtRr
A | (i) only |
B | (i) and (iii) only |
C | (ii) and (iii) only |
D | (iii) and (iv) only |
Question 6 |
Recursive descent parsing belongs to the class of_____
A | Top-down parsing |
B | Bottom-up parsing |
C | Predictive parsing |
D | None of Above |
Question 7 |
The top-down parsing method is also called____
A | Operator precedence parsing |
B | Recursive descent parsing |
C | Shift reduce parsing |
D | None of Above |
Question 8 |
A top-down parser generates____
A | Left-most derivation in reverse |
B | Left-most derivation |
C | Right-most derivation in reverse |
D | Right –most derivation |
Question 9 |
Which of these is not true about the Symbol Table?
A | All the labels of the instructions are symbols |
B | Table has entry for symbol name address value |
C | Perform the processing of the assembler directives |
D | Created during pass 1 |
Question 10 |
The most general phase structured grammar___
A | Context sensitive |
B | Context free |
C | Regular |
D | None of Above |
Question 11 |
Shift reduce parsers are __________
A | Top down Parser |
B | Bottom Up parser |
C | May be top down or bottom up |
D | None of Above |
Question 12 |
Which of the following class of statement usually produces no executable code when compiled?
A | Assignment statement |
B | Structural statements |
C | Input and output statements |
D | Declaration |
Question 13 |
Which of the following statements is false?
A | Left as well as right most derivations can be in Unambiguous grammar |
B | An LL (1) parser is a top-down parser |
C | LALR is more powerful than SLR |
D | Ambiguous grammar can’t be LR (k) |
Question 14 |
A grammar for a programming language is a formal description of _______________
A | Syntax |
B | Semantics |
C | Structure |
D | Library |
Question 15 |
Pee Hole optimization __________
A | Loop Optimization |
B | Local Optimization |
C | Constant folding |
D | Data Flow analysis |
Question 16 |
The method which merges the bodies of two loops is
A | Constant folding |
B | Loop jamming |
C | Loop unrolling |
D | None of Above |
Question 17 |
The process of assigning load addresses to the various parts of the program and adjusting the code and data in the program to reflect the assigned addresses is called____
A | Parsing |
B | Assembly |
C | Relocation |
D | Symbol resolute |
Question 18 |
CSG (COntext Sensitive Grammar) can be recognized by____
A | Push down automata |
B | Finite state automata |
C | 2-way linear bounded automata |
D | All of the above |
Question 19 |
Which of the following parsers is the most powerful?
A | SLR |
B | LALR |
C | Canonical LR |
D | Operator-precedence |
Question 20 |
Which of the following symbol table implementation is based on the property of locality of reference?
A | Linear list |
B | Self-organizing list |
C | Search tree |
D | Hash table |
Question 21 |
The process of searching for matched tokens is typically described using ___
A | Finite automata |
B | Regular expressions |
C | Context free grammar |
D | Both a and b |
Question 22 |
Consider a program P that consists of two source modules M1(contains reference to a function defined in M2) and M2 contained in two different files.
A | Compile time |
B | Edit time |
C | Link time |
D | Load time |
Question 23 |
Which of the following techniques is used to replace run-time computations by compile time computations?
A | Invariant computation |
B | Constant folding |
C | Code hoisting |
D | Pee phole optimization |
Question 24 |
Compute E.value for the root of the parse tree for the expression:
2 # 3 & 5 # 6 &4.
A | 200 |
B | 180 |
C | 160 |
D | 40 |
Question 25 |
Which of the following derivations does a top-down parser use while parsing an input string?
A | Leftmost derivation |
B | Leftmost derivation in reverse |
C | Rightmost derivation |
D | Rightmost derivation in reverse |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results
There are 25 questions to complete.
← |
List |
→ |
Return
Shaded items are complete.
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 |
End |
Return
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
Correct Answer
You Selected
Not Attempted
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Question Details
Results
Date
Score
Hint
Time allowed
minutes
seconds
Time used
Answer Choice(s) Selected
Question Text
All done
Need more practice!
Keep trying!
Not bad!
Good work!
Perfect!