Compiler

C is a middle or low level language programming language. So we need to convert this into binary language . To convert high level language into low level or binary language we need Translators.
  • Compiler is a translator ,which translate a program written in high-level language into binary language (machine language)
  • Compiler translate the entire source program into object program at once.
  • In compiler , intermediate object code is generated , condition control statements are execute faster .

 Example of compiler:- GCC, c compiler.

 Interpreter

Interpreter translate a program written in high -level language into machine language. And it is also involved in its execution.
  • Interpreter translate entire source of program into object program line by line and immediately executes.
  • It takes single instruction as input, there is no intermediate object code is generated.
  • In interpreter memory requirements is Less.
  • Every time interpreter convert higher level program into lower level program.

Example:- BASIC

Role of Compiler

  1. Compliers reads the source code, outputs executable code
  2. Translates software written during a higher-level language into instructions that computer can understand. It converts the text that a programmer writes into a format the CPU can understand.
  3. The process of compilation is relatively complicated. It spends a lot of time analyzing and processing the program.
  4. The executable result's some sort of machine-specific code .

Role of Interpreter

  1. The interpreter converts the source code line-by-line during RUN Time.
  2. Interpret completely translates a program written during a application-oriented language into machine level language.
  3. Interpreter allows evaluation and modification of the program while it's executing.
  4. Relatively less time spent for analyzing and processing the program.
  5. Program execution is relatively slow compared to compiler.