Home » Compiler Design MCQ Answers

Compiler Design MCQ Answers

Compiler Design MCQ Answers. Get all of the validated answers for the compiler design mcq. Ideal for quick and fast review or getting ready for the actual test. if you have short time then you are on right place.

Compiler Design MCQ Answers

This is the compiler design mcq with 100% correct answers:

Q1. Characters are grouped into tokens in which of the following phase of the compiler design?

  1. Code generator
  2. Parser
  3. Code optimization

Q2. Why Generation of intermediate code based on an abstract machine model is useful in compilers?

  1. Writing for intermediate code generation
  2. Portability of the front end of the compiler
  3. All of the mentioned

Q3. Why System program such as compiler are designed?

  1. They are Serially usable
  2. They are Nonreusable
  3. All of the mentioned

Q4. Which of the following technique is used for building cross compilers for other machines?

  1. Mexican Cross
  2. X-cross
  3. Brazilian Cross

Q5. Which of the following can detect an error if a programmer by mistake writes multiplication instead of division?

  1. Interpreter
  2. Compiler or interpreter test
  3. Compiler

Q6. Who is responsible for the creation of the symbol table?

  1. Assembler
  2. Interpreter
  3. All of the mentioned

Q7. Which of the following is known as a compiler for a high-level language that runs on one machine and produces code for a different machine?

  1. Multipass compiler
  2. Optimizing compiler
  3. One pass compiler

Q8. Which of the following is a system program that integrates a program’s individually compiled modules into a form that can be executed?

  1. Interpreter
  2. Assembler
  3. Compiler

Q9. Which of the following is a definition of compiler?

  1. Program is put into memory and executes it
  2. Translation of assembly language into machine language
  3. None of the mentioned

Q10. Which of the following phase of the compiler is Syntax Analysis?

  1. Third
  2. First
  3. All of the mentioned

Q11. Which of the following concept of FSA is used in the compiler?

  1. Code optimization
  2. Code generation
  3. Parser

Q12. Which of the following is a part of a compiler that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories?

  1. Optimizer
  2. Parser
  3. None of the mentioned

Q13. Let L1 = {w ∈ {0,1}∗ | w has at least as many occurrences

of (110)’s as (011)’s}.

Let L2 = { ∈ {0,1}∗ | w has at least as many occurrences

of (000)’s as (111)’s}.

Which of the following is correct?

  1. L2 is regular
  2. L1 and L2 are regular
  3. None of them are regular

Q14. What is CFG?

  1. Regular Expression
  2. Language expression
  3. All of the mentioned

Q15. Which of the following is a correct statement?

For some programming languages, there are parsing algorithms with an O(3) complexity.

A recursive programming language can be constructed with static storage allocation.

In the context of bottom-up parsing, no L-attributed definition can be evaluated.

Code-improvement modifications can be carried out at both the intermediate and source code levels.

  1. I and III
  2. I, II and IV
  3. I, II, III and IV

Q16. Which of the following is correct regarding an optimizer Compiler?

  1. Optimize the code
  2. Is optimized to occupy less space
  3. Both of the mentioned

Q17. Which of the following error can Compiler diagnose?

  1. Logical errors only
  2. Grammatical and logical errors
  3. All of the mentioned

Q18. In which of the following phase of the compiler is Lexical Analyser?

  1. Second
  2. Third
  3. All of the mentioned

Q19. Which of the following does an address code involve?

  1. No unary operators
  2. Exactly 3 address
  3. At most Three address

Q20. An object module for a group of programs that were compiled separately is handed to a linker. Which of the following about an object module isn’t true?

  1. Relocation bits
  2. Names and locations of all external symbols denied in the object module
  3. Object code

Q21. What is a compiler?

  1. system program that converts machine language to high-level language
  2. system program that writes instructions to perform
  3. None of the mentioned

Q22. Which of the following is a stage of compiler design?

  1. Semantic analysis
  2. Intermediate code generator
  3. Code generator

Q23. What is the use of a symbol table in compiler design?

  1. Finding name’s scope
  2. Type checking
  3. Keeping all of the names of all entities in one place

Q24. Which of the following error can a compiler check?

  1. Logical Error
  2. Both Logical and Syntax Error
  3. Compiler cannot check errors

Q25. A programmer, writes a program to multiply two numbers instead of dividing them by mistake, how can this error be detected?

  1. Compiler or interpreter
  2. Compiler only
  3. Interpreter only

Also Read: Microprocessor MCQ Answers

Note: If you have the new question on this test, please comment Question and Multiple-Choice list in form below this article. We will update answers for you in the shortest time. Thank you! We truly value your contribution to the website.

Leave a Reply

Your email address will not be published. Required fields are marked *