Compiler Design

Download Q&A
Q. Which of the following statements about intermediate code is true?
  • A. It is always in a high-level programming language
  • B. It is specific to the target architecture
  • C. It can be optimized before final code generation
  • D. It is not used in modern compilers
Q. Which of the following statements is true about LL and LR parsers?
  • A. LL parsers are more powerful than LR parsers.
  • B. LR parsers can handle all LL grammars.
  • C. LL parsers can handle all LR grammars.
  • D. Both LL and LR parsers are equivalent in power.
Q. Which of the following tools is commonly used to implement a lexical analyzer?
  • A. Yacc
  • B. Lex
  • C. Bison
  • D. ANTLR
Q. Which optimization technique can help reduce the number of memory accesses?
  • A. Loop fusion
  • B. Function inlining
  • C. Dead code elimination
  • D. Code hoisting
Q. Which optimization technique can lead to a trade-off between speed and memory usage?
  • A. Function inlining
  • B. Loop fusion
  • C. Code hoisting
  • D. Strength reduction
Q. Which optimization technique focuses on reducing the number of instructions executed?
  • A. Loop unrolling
  • B. Constant folding
  • C. Common subexpression elimination
  • D. Code motion
Q. Which optimization technique involves removing code that does not affect the program's output?
  • A. Loop unrolling
  • B. Dead code elimination
  • C. Constant folding
  • D. Inlining
Q. Which parsing technique is generally more powerful, LL or LR?
  • A. LL
  • B. LR
  • C. Both are equally powerful.
  • D. Neither is powerful.
Showing 91 to 98 of 98 (4 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely