Correct option is B
A Compiler is a software program that translates code written in a high-level programming language (like C, C++, Java) into machine language (binary code) that a computer's CPU can understand and execute. The compiler performs this task in a single batch or multiple phases and often includes syntax checking, optimization, and error reporting.
Important Key Points:
1. Compiler: It translates entire programs from high-level languages into machine code before execution. Examples include GCC (for C/C++) and the Java Compiler (javac).
2. Compilers are used for compiled languages, ensuring the program can run independently of the source code once compiled.
3. The output of the compiler is an object file or executable file, depending on the process.
Knowledge Booster:
• Assembler: Converts assembly language (a low-level language) into machine code, not high-level languages.
• Loader: Loads executable programs into memory for execution but does not translate any language.