Compiler Design Set 2
Free Online Best Compiler Design MCQ Questions for improve your basic knowledge of Compiler Design. This Compiler Design set 2 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 2.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
Cross-compiler is a compiler __________
A | Which is written in a different language from the source language? |
B | That generates object code for the machine it’s running on. |
C | Which is written in the same language as the source language? |
D | That runs on one machine but produces object code for another machine |
Question 2 |
A bottom-up parser generates____
A | Left-most derivation in reverse |
B | Left-most derivation |
C | Right-most derivation in reverse |
D | Right –most derivation |
Question 3 |
The regular expression have all strings of 0?s and 1?s with no two consecutive 0?s is____
A | (0+1) |
B | (0+1)* |
C | (0+?) (1+10)* |
D | (0+1)* 011 |
Question 4 |
Which of the following is used for grouping of characters into tokens?
A | Scanner |
B | Code generator |
C | Code optimizer |
D | Parser |
Question 5 |
Lexical analysis is about breaking a sequence of characters into___
A | Tokens |
B | Lines |
C | Groups |
D | Packets |
Question 6 |
The regular expression with all strings of 0?s and 1?s with at least two consecutive 0?s is_____
A | 1 + (10)* |
B | (0+1)*00(0+1)* |
C | (0+1)*011 |
D | 0*1*2* |
Question 7 |
LR stands for____
A | Left to right |
B | Left to right reduction |
C | Right to left |
D | Left to right and right most derivation in reverse |
Question 8 |
The __________ is a technique for building cross compilers for other machines.
A | Brazilian Cross |
B | Canadian Cross |
C | Mexican Cross |
D | X-cross |
Question 9 |
_____ is considered as a sequence of characters in a token.
A | Pattern |
B | Texeme |
C | Lexeme |
D | Mexeme |
Question 10 |
What is the name of the process that determining whether of tokens can be generated by a grammar?
A | Analysing |
B | Parsing |
C | Translating |
D | Recognizing |
Question 11 |
Type checking is normally done during_____
A | Code optimization |
B | Syntax directed translation |
C | Lexical analysis |
D | Syntax analysis |
Question 12 |
Which of the following is NOT the set of regular expression R = (ab + abb)* bbab?
A | ababbbbab |
B | abbbab |
C | ababbabbbab |
D | abababab |
Question 13 |
Back- patching is useful for handling____
A | Forward references |
B | Backward references |
C | Conditional jumps |
D | Unconditional jumps |
Question 14 |
The graph depicting the inter-dependencies of the attribute of different nodes in a parse is called____
A | Dependency graph |
B | Karnaugh’s graph |
C | Steffi graph |
D | Flow graph |
Question 15 |
The phase Syntax Analysis is modeled on the basis of_____
A | High level language |
B | Low level language |
C | Context free grammar |
D | Regular grammar |
Question 16 |
_____ constructs the desired target program from the intermediate representation of the source program.
A | Analysis part |
B | Lexical part |
C | Synthesis part |
D | None of Above |
Question 17 |
Linear analysis is called ____ in a compiler.
A | Both a and b |
B | Lexical analysis |
C | Scanning |
D | Testing |
Question 18 |
The parsing technique that avoids backtracking is____
A | Top-down parsing |
B | Recursive-descent parsing |
C | Predictive parsing |
D | Both b and c |
Question 19 |
The lexical analyzer takes ____ as input and produces a list of ___ of output.
A | Machine code, mnemonic |
B | Tokens, source code |
C | Source code, tokens |
D | Both a and b |
Question 20 |
___ grammars are not phase structured grammar.
A | Regular |
B | Context free |
C | Context sensitive |
D | None of these |
Question 21 |
__________ was developed from the beginning as a cross compiler.
A | Free Pascal |
B | GCC |
C | Pascal |
D | None of Above |
Question 22 |
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 |
Question 23 |
A grammar that produces more than one parse tree for some sentence is called __________
A | Ambiguous |
B | Unambiguous |
C | Regular |
D | None of Above |
Question 24 |
The bottom-up parsing method is also called___
A | Shift reduce parsing |
B | Predictive parsing |
C | Recursive descent parsing |
D | None of Above |
Question 25 |
A bottom up parser generates __________
A | Right most derivation |
B | Rightmost derivation in reverse |
C | Leftmost derivation |
D | Leftmost 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!