Compiler Design Important Questions For University Exams

Note: Learn all these questions in detail to score more than 90 out of 100.

Short Q/A

  • What is Compiler
  • Difference between Compiler & Interpreter
  • What is Tokens?
  • Role of a lexical analyzer
  • Bottom-Up Parsing
  • Static vs Dynamic checking
  • Nested lexical scooping
  • DAG representation
  • Lexical-Phase Errors
  • Code movement optimization
  • Difference between L-value & R-value
  • Lexical analysis tools
  • LALR Parsing table
  • Use of ambiguous grammar in LR parser
  • Type equivalence
  • Structure of symbol table
  • Intermediate Language
  • Control Flow in Compiler
  • Semantic errors
  • Loop optimization
  • Code generation using dynamic programming
  • Three Address code
  • Type checking & Type conversion

Long Q/A

  • Phases of compiler
  • Compiler writing tools
  • Lexical analysis and its tools
  • Context-Free grammar
  • Top-down & Bottom-up parser
  • Designing of LL Parse Table for grammar
  • Why is LR parsing attractive?
  • Recursive Evaluators
  • Type Conversion
  • Ordered List
  • Hashtable
  • Various approaches to symbol table generation
  • Translation of assignment statements
  • Factor that affects code generation
  • The heuristic for ordering nodes of DAG
  • Peephole optimization
  • Algorithm for code generation
  • Code optimization phases
  • Dead code optimization
  • Loop optimization
  • Local optimization
  • Iterative data flow analysis
  • How phases could be clubbed as a pass in the compiler?
  • Operator precedence grammar & its algorithm
  • Algorithm for construction simple Lr parsing table with example
  • Define first and flow
  • Steps to find first & flow of grammar
  • Working methodology of canonical LR parser with an example
  • S-Attribute definition & R-Attribute definition with an example
  • Define 3-Address code & Quadruples
  • Give 3-Address code & Quadruples for various statements
  • Various code optimization technique with examples
  • Define “Basic Blocks” & its operations
  • DAG & how basic blocks can be represented as DAG
  • Difference between call by value & call by reference
  • Describe language denoted by regular expression
  • What do non-deterministic finite automata represents?
  • Context-Free Grammar with an example
  • Directed acyclic graph(DAG) for various expressions
  • Difference between stack & heap storage with examples
  • Use of code movement to optimize codes
  • Left recursive grammar
  • Left factorial grammar with examples