Compiler Design Quiz


Play this quiz that will help you to excel in Compiler Design certification exams, placements etc. This Compiler Design quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This test enables you to assess your knowledge of Compiler Design.

Take the Free Practice Test



Compiler Design MCQs

Practice Compiler Design MCQ Questions, which will help you to understand compiler related concepts and also helps you to prepare for placements, technical rounds, interviews, competitive exams etc.

Compiler Design Quiz

Try Free Compiler Design Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

Compiler Design Quiz

1. In the input file, In which section Anything written in this brackets is copied directly to the file lex.yy.c?

Rules Section
Definition Section
User Code Section
None of the above

2. The following code is an example of?

void add_ten(int x)
{
   return x + 10;
   printf(""value of x is %d"", x);
}

Redundant instruction elimination
Unreachable code
Flow of control optimization
None of the above

3. The rule section is enclosed in?

%%
$$
%%%%
$$$$

4. x * 2 can be replaced by x << 1 is an example of?

Algebraic expression simplification
Accessing machine instructions
Strength reduction
Code Generator

5. When the parser starts constructing the parse tree from the start symbol and then tries to transform the start symbol to the input, it is called?

bottom-up parsing
top-down parsing
Both A and B
None of the above

6. Which attributes get values from the attribute values of their child nodes?

Synthesized attributes
Inherited attributes
S-attributed SDT
L-attributed SDT

7. Whenever a procedure is executed, its activation record is stored on the stack, also known as?

Access Stack
Control stack
Formal Stack
Return Stack

8. If R is regular language and Q is any language (regular/ non regular), then Pref (Q in R) is _____________

Non-regular
Equal
Infinite
Regular

9. When the lexical analyzer read the source-code, it scans the code?

line by line
word by word
letter by letter
reads the whole program

10. Code generation can be considered as the?

first phase of compilation
second phase of compilation
third phase of compilation
final phase of compilation

Results