top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between compiler and interpreter?

0 votes
855 views
What is the difference between compiler and interpreter?
posted Sep 14, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote
  • Compiler takes entire program as input where as interpreter takes single line instruction. so conditional statement executed fast in compiler than the interpreter
  • intermediate code is generated in compiler whereas no intermediate code in interpreter
  • program is compile once and executed many times until we not changed the program whereas in interpreter the program is translated into high level language to low level language ex: C compiler and any browser uses interpreter.

enter image description here

So in short when a user writes a code in a high level language such as C and wants it to execute, C compiler is used before it will be executed. The compiler scans the entire program first and then translates it into machine code which will be executed by the computer processor and the corresponding tasks will be performed. Now coming to Interpreter, they also convert the high level language into machine readable binary equivalents. Each time when an interpreter gets a high level language code to be executed, it converts the code into an intermediate code before converting it into the machine code. Each part of the code is interpreted and then execute separately in a sequence.

answer Sep 14, 2014 by Nimish
0 votes

compiler executes as a whole program and gives the result
interpreter is a line by line execution process

answer Sep 14, 2014 by anonymous
Similar Questions
0 votes

While reading shared library and PLT (Procedure Linkage Table) I came under a term Trampolines arrangement.

can any one share some info on it ?

+2 votes

What steps are performed by a compiler and how many types of compilers are present and used frequently ?

...