1. It translates high-level language programs into object code
  2. It translates object code into a high-level language
  3. It translates object code into assembly language instructions
  4. It translates assembly language instructions into object code
4 views

1 Answers

Option 1 : It translates high-level language programs into object code

Explanation:

  • The primary and main function of a Compiler is to translate source code from a high-level programming language to a lower-level language like object code. A compiler creates a machine code that runs on a processor with a specific Instruction Set Architecture (ISA), which is processor-dependent.
  • An Assembler converts assembly language code into machine code or object code.

 

This can be clearer with the pictorial representation below-

 

  • Translators- The most general term for a software code converting tool is “translator.” A translator, in software programming terms, is a generic term that could refer to a compiler, assembler, or interpreter.
  • Interpreters- An interpreter translates code like a compiler but reads the code and immediately executes on that code, and therefore is initially faster than a compiler.
4 views

Related Questions