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

Discussion

The preprocessor is responsible for

  • A.placing the executable program into memory ready to be run
  • B.macro expansion and the inclusion of other source files
  • C.translating the source program into relocatable machine code
  • D.resolving references to routines held in separate object files

Answer: B

Correct answer: macro expansion and the inclusion of other source files

The preprocessor works on text before the compiler sees anything, expanding macros, including named files and evaluating conditional compilation directives. Its output is a modified source program.

Because it operates on text rather than on syntax, it knows nothing of types or scopes, which is the source of the classic macro pitfalls. Translation to machine code belongs to the compiler and assembler, resolving external references to the linker, and loading into memory to the loader.

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

Post your comment

Please log in or register to post a comment.