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

Discussion

Which is the correct sequence of compilation process?

  • A.Assembler -> Compiler -> Preprocessor -> Linking
  • B.Compiler -> Assenbler -> Preprocessor -> Linking
  • C.Preprocessor -> Compiler -> Assembler -> Linking
  • D.Assembler -> Compiler -> Linking -> Preprocessor

Answer: C

Correct answer: Preprocessor -> Compiler -> Assembler -> Linking

Each stage consumes what the previous one produced. The preprocessor handles #include, #define and conditional compilation, emitting a single translation unit of pure C.

The compiler turns that into assembly, the assembler into an object file holding machine code with unresolved external references, and the linker joins the object files and libraries into an executable. A call to a function that was declared but never defined is a link error precisely because the linker is the first stage to look across files.

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

Post your comment

Please log in or register to post a comment.