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?
- Code generator
- Lexical analyzer
- Parser
- Code optimization
Q2. Why Generation of intermediate code based on an abstract machine model is useful in compilers?
- Writing for intermediate code generation
- Portability of the front end of the compiler
- Implementation of lexical analysis and syntax analysis is made easier
- All of the mentioned
Q3. Why System program such as compiler are designed?
- They are Serially usable
- They are Re-enterable
- They are Nonreusable
- All of the mentioned
Q4. Which of the following technique is used for building cross compilers for other machines?
- Canadian Cross
- Mexican Cross
- X-cross
- Brazilian Cross
Q5. Which of the following can detect an error if a programmer by mistake writes multiplication instead of division?
- Interpreter
- Compiler or interpreter test
- Compiler
- None of the mentioned
Q6. Who is responsible for the creation of the symbol table?
- Assembler
- Compiler
- Interpreter
- 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?
- Cross compiler
- Multipass compiler
- Optimizing compiler
- 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?
- Interpreter
- Assembler
- Compiler
- Linking Loader
Q9. Which of the following is a definition of compiler?
- Acceptance of a program written in a high-level language and produces an object program
- Program is put into memory and executes it
- Translation of assembly language into machine language
- None of the mentioned
Q10. Which of the following phase of the compiler is Syntax Analysis?
- Second
- Third
- First
- All of the mentioned
Q11. Which of the following concept of FSA is used in the compiler?
- Code optimization
- Code generation
- Lexical analysis
- 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?
- Optimizer
- Scanner
- Parser
- 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?
- L2 is regular
- L1 and L2 are regular
- L1 is regular but not L2
- None of them are regular
Q14. What is CFG?
- Regular Expression
- Compiler
- Language expression
- 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.
- I and III
- I and IV
- I, II and IV
- I, II, III and IV
Q16. Which of the following is correct regarding an optimizer Compiler?
- Optimize the code
- Is optimized to occupy less space
- Both of the mentioned
- None of the mentioned
Q17. Which of the following error can Compiler diagnose?
- Logical errors only
- Grammatical and logical errors
- Grammatical errors only
- All of the mentioned
Q18. In which of the following phase of the compiler is Lexical Analyser?
- Second
- Third
- First
- All of the mentioned
Q19. Which of the following does an address code involve?
- No unary operators
- Exactly 3 address
- At most Three address
- None of the mentioned
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?
- Relocation bits
- Names and locations of all external symbols denied in the object module
- Absolute addresses of internal symbols
- Object code
Q21. What is a compiler?
- system program that converts instructions to machine language
- system program that converts machine language to high-level language
- system program that writes instructions to perform
- None of the mentioned
Q22. Which of the following is a stage of compiler design?
- Semantic analysis
- Intermediate code generator
- Code generator
- All of the mentioned
Q23. What is the use of a symbol table in compiler design?
- Finding name’s scope
- Type checking
- Keeping all of the names of all entities in one place
- All of the mentioned
Q24. Which of the following error can a compiler check?
- Syntax Error
- Logical Error
- Both Logical and Syntax Error
- 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?
- Compiler or interpreter
- Compiler only
- Interpreter only
- None of the mentioned
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.








