Difference Between Computer Compiler And Interpreter

Asked By 50 points N/A Posted on -
qa-featured

What is meaning of a Compiler and an Interpreter? Are they the same?

SHARE
Answered By 40 points N/A #180949

Difference Between Computer Compiler And Interpreter

qa-featured

Hi

The Compiler and Interpreter are not the same. A compiler compiles the whole program typed out by the user and overlooks all the errors and sees to it that the overall program is ready for execution. An Interpreter checks the program line by line and gives a warning if there is an error in any one of the lines. 

Answered By 567010 points N/A #180950

Difference Between Computer Compiler And Interpreter

qa-featured

A compiler is a unique or special program that processes statements written in a specific programming language and converts them into machine language or the language understand by the computer. Normally, a programmer writes language statements using a programming language like C or Pascal one line at a time with the use of an editor. The contents of the file created are called source statements.

After that, the programmer runs the suitable language compiler specifying the name of the file that contains the source statements. Upon execution, the compiler will parse first or examine every statement syntactically one after the other.

After that, in one or more consecutive passes or stages, it will build the output code ensuring that statements that refer or point to other statements are referred to precisely in the final code. An interpreter, on the other hand, is a computer program that directly executes instructions written in a programming language without compiling it first into machine language.

The main disadvantage of interpreters is that an interpreted program runs slower compared to when it is compiled. This is because the interpreter must analyze every statement in the program every time it is executed and then perform the desired action. While in a compiled code, the computer just executes the action within a fixed context established by the compilation.

Login/Register to Answer

Related Questions