What is the Translator in C Language

Programming

A translator is system software that converts one programming language to a machine-level language. Software that provides services to another program is known as system software.

Example: – operating system, driver, compiler, assembler interpreter etc…

Types of Translator

There are generally three types of translators there: compiler, assembler, interpreter.

Compiler: is system software that converts high-level programming language to a machine-level programming language. Compiler generally used in high-level programming languages such as C, C++, PHP java, etc.

Compile converts the entire source code to the object code. There are only two types of symbols used in object code, such as (0,1), which is understood by the machine.

Object code depends on the machine, which means that the object code can be deferred to another machine. If an error is generated, it can not provide or generate object code.

Assembler: is system software that is used to convert assembly language to a machine-level language. It can translate the assembly code into the machine code or binary language.

The following diagram describes the assembly process.

translator

Interpreter: An interpreter is a system software used to translate high-level programming into a machine-level programming language.

It takes a statement of a higher-level language and at that time it translates into a machine-level language. System software that translates higher-level language line by line is known as an interpreter. The interpreter is faster than the compiler. It needs less memory than a compiler. The FoxPro use Interpreter.

Different between compiler and interpreter

Compiler:

  • is system software which translates the whole program into machine code
  • It requires more memory than an interpreter
  • It is not faster than an interpreter
  • C language, C++, PHP, .NET use compiler

Interpreter:

  • is system software which translates the high-level programming language into machine language line by line
  • It requires less memory than the compiler
  • It is faster than a compiler
  • FoxPro use interpreter