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

Answer: C

Explanation:

Compiler

A compiler is a translation method that converts the entire source code into machine code before execution. This allows for the optimized execution of programs as the machine code is generated all at once, enabling faster runtime performance.

A) Operating system

An operating system is not a translation method; rather, it is system software that manages computer hardware and software resources. It provides a platform for applications but does not translate source code into machine code for execution.

B) Interpreter

An interpreter translates source code into machine code line by line during execution, rather than converting the entire code at once. This means it does not produce a separate machine code file for later execution, which distinguishes it from a compiler.

C) Compiler

A compiler translates all source code into machine code at once, producing an executable file that can be run independently of the source code. This method is efficient for performance as it allows programs to run faster after the initial compilation.

D) Assembler

An assembler translates assembly language into machine code but operates at a lower level than a compiler. It converts code that is already close to machine language rather than high-level source code, making it an unsuitable choice for the question asked.

Conclusion

The compiler is the only correct option as it converts the complete source code into machine code for later execution, allowing for optimized performance. In contrast, the other options either do not perform this function or operate on different levels of programming languages, making them incorrect choices for the question.