Question #90170

What is the difference between a compiler
and an interpreter in a computer ?

Expert's answer

Answer:

Both compiler and interpreters convert higher level programming language used by humans to machine code executed by computer. However, a compiler will convert the code into machine code (create an exe) before program run. Interpreters convert code into machine code when the program is run. Generally, complier has more room for optimization since it is analyzing the whole program and has more time for conversation to machine code.


References:

  1. https://www.guru99.com/difference-compiler-vs-interpreter.html
  2. https://hackernoon.com/compilers-and-interpreters-3e354a2e41cf
  3. https://www.programiz.com/article/difference-compiler-interpreter
LATEST TUTORIALS
APPROVED BY CLIENTS