Practice Compiler Design Questions and Answers
- Which of the following is TRUE about symbol tables?
- Which technique is used to handle left recursion in a grammar?
- Which of these is a bottom-up parser?
- Which of these is an example of a peephole optimization technique?
- Which of the following tasks is NOT performed during lexical analysis?
- Which statement about intermediate code is TRUE?
- Which phase of the compiler checks the type consistency of the program?
- Which of these is used for resolving operator precedence in parsing?
- Which data structure is commonly used in implementing a recursive descent parser?
- Which error is detected during lexical analysis?
- What is the primary output of the lexical analysis phase of a compiler?
- Which of the following tools is commonly used to generate a lexical analyzer (scanner) from a set of regular expressions?
- A "lexeme" refers to:
- The process of grouping characters into meaningful units (tokens) is performed by the:
- Which parsing technique is a top-down parser that cannot handle left recursion and requires the grammar to be free of common prefixes?
- A "shift-reduce" parser is a type of:
- Which of the following parsers is the most powerful (can parse the largest class of grammars)?
- A "shift/reduce conflict" in an LR parsing table occurs when:
- Which LR parser is often preferred in practice because it offers a good balance between power and table size, resolving most conflicts that SLR(1) cannot?
- A grammar that produces multiple parse trees for the same input string is called:
- The primary role of the parser is to:
- In a Syntax-Directed Definition (SDD), attributes are associated with:
- An S-attributed SDD (Syntax-Directed Definition) is one where:
- What is the main purpose of Syntax-Directed Translation?
- Which of the following is NOT a common form of 3-address code?
- A 3-address instruction typically has the form:
- What is a primary advantage of generating intermediate code during compilation?
- An "activation record" (or stack frame) is created for each function call and typically contains:
- Which memory allocation strategy is used for global variables and static variables, where memory is allocated once at compile time and remains throughout p...
- What is the primary purpose of a "symbol table" in a compiler's runtime environment?
- Dynamic memory allocation (e.g., using `malloc` or `new`) typically occurs in which part of the runtime memory?
- Which code optimization technique replaces occurrences of a variable with its constant value if the variable has been assigned a constant value that is not...
- "Liveness analysis" in code optimization determines:
- Common Subexpression Elimination (CSE) is an optimization technique that:
- Which of the following is an example of a "local optimization"?
- "Dead code elimination" is an optimization that removes:
- Data flow analysis is a technique used by optimizers to:
- Which optimization technique involves replacing a sequence of instructions with a shorter or faster sequence, often by looking at a small "window" of instr...
- The primary goal of code optimization is to:
- If an expression `x = a + b` is computed, and later in the same basic block, `y = a + b` is computed, a compiler can apply which optimization?
More Topics
- Algorithms Questions
- Analog and Digital Communication Questions
- Artificial Intelligence & Machine Language Questions
- Basics of Computers Questions
- Big Data Analytics Questions
- C Programming Questions
- C++ Questions
- Computer Architecture and Design Questions
- Cyber Security Questions
- Data Analytics Languages Questions
- Data Structure Questions
- Data Warehousing Questions
- Digital Logic Questions
- IOT and mobile Computing Questions
- IT DBMS Questions
- IT Networking Questions
- IT Operating System Questions
- Machine Learning Questions
- Memory Management Questions
- Microsoft Office Questions
- Network Layer and IP Protocol Questions
- Numerical and Statistical Computing Questions
- Object Oriented Programming Questions
- OOPS Concepts Questions
- Previous Year Questions Questions
- Programming Concept Questions
- Python Questions
- Shell Scripting Questions
- Software Engineering and Web Technology Questions
- SQL Questions