1. What is an assembler?

  • A) A device used to assemble electronic circuits
  • B) A program that translates assembly language into machine code
  • C) Convert high-level language code to machine code
  • D) A tool for debugging source code
B) A program that translates assembly language into machine code Explanation

2. In the context of assemblers, what does “peephole optimization” involve?

  • A) Advanced control flow analysis
  • B) Optimizing macro expansions
  • C) Recalculating addresses between passes
  • D) Localized code improvements based on small code sequences
D) Localized code improvements based on small code sequences Explanation

3. Which assembly directive is used to define a constant value?

  • A) .data
  • B) .const
  • C) .equ
  • D) .define
C) .equ Explanation

4. What is the primary output of an assembler?

  • A) Source code
  • B) Binary code
  • C) High-level language code
  • D) Intermediate code
B) Binary code Explanation

5. During assembly, what do symbolic labels get converted into?

  • A) Memory addresses
  • B) High-level language code
  • C) Intermediate code
  • D) Machine code instructions
A) Memory addresses Explanation