Final Answer:
Compilation involves translating source code into object code, while linking combines object files and resolves references, producing the final executable program. The option C. is correct.
Step-by-step explanation:
Compilation and linking are the two essential operations invoked when compiling code. Compilation involves translating the high-level source code into an intermediate form, often referred to as object code. This step includes lexical analysis, syntax analysis, semantic analysis, and code generation. After compilation, the code is in the form of object files, and linking comes into play.
In the compilation process, the source code undergoes various stages of transformation. Lexical analysis breaks down the code into tokens, syntax analysis ensures proper syntax structure, and semantic analysis verifies the meaning of the code. Code generation then produces the intermediate object code. This series of transformations ensures that the code is correctly translated into a form that the computer can execute.
Following compilation, linking is the subsequent step. Linking involves combining the compiled object code with other necessary object files, libraries, and resolving external references. The linker creates a unified executable file, incorporating all the required components. This final executable is ready to be loaded into memory and executed. Thus, the combination of compilation and linking ensures the successful translation of source code into an executable program. Therefore the option C. is correct.