60. Which translation method converts all source code into machine code for later execution?

Answer: A

Explanation:

Compiler

A compiler is a translation method that converts all source code into machine code, which can then be executed later. This process allows the program to run efficiently, as the entire code is pre-translated into a format that the machine can understand directly.

A) Compiler

This option is correct because a compiler translates the entire source code into machine code before execution. It generates an executable file that can be run by the operating system without needing the original source code, making it efficient for program execution.

B) Assembler

An assembler is not the correct choice as it specifically translates assembly language into machine code, rather than handling high-level source code. While it does convert code to machine language, it does not encompass the full range of translation that a compiler does.

C) Operating system

The operating system is responsible for managing hardware and software resources, but it does not perform the task of converting source code into machine code. It executes programs that have already been compiled or interpreted.

D) Interpreter

An interpreter translates source code into machine code line-by-line during execution, rather than converting the entire code at once like a compiler. This means it does not produce a separate executable file, making it an incorrect choice for the question.

Conclusion

The compiler is definitively the correct answer because it performs the complete translation of source code into machine code for later execution, unlike the other options which either translate different types of code or manage execution processes. This fundamental characteristic distinguishes compilers as essential tools in programming.