Machine-translated by Google. Questions are authored in English.
Top

Discussion

The output of a code generator may be

  • A.only assembly language for a separate assembler to process
  • B.an intermediate representation for a later compiler to consume
  • C.absolute machine code, relocatable code or assembly language
  • D.only absolute machine code ready to execute immediately

Answer: C

All three are used in practice. Emitting assembly is easiest to debug, relocatable code supports separate compilation, and absolute code suits a load and go compiler. The choice is usually settled by how the compiler is meant to be used.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.