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

Discussion

The output of the code generation phase is

  • A.an executable file ready to be loaded and run by the system
  • B.a listing of the errors found during the compilation
  • C.target code, either assembly or relocatable machine instructions
  • D.an annotated syntax tree with all types filled in

Answer: C

Correct answer: target code, either assembly or relocatable machine instructions

Code generation is the last phase of the compiler, so its output is the compiler's output: assembly text for a subsequent assembler, or relocatable machine code directly.

It is not yet an executable - external references remain unresolved until the linker has run, and addresses are not fixed until the loader places the image. An annotated syntax tree is the semantic analyser's product, several phases earlier, and diagnostics are a by-product rather than the output.

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

Post your comment

Please log in or register to post a comment.