Sunday, 20 May 2012

What is a compiler? How does it differ from an interpreter?

    Compiler is a standard program written & supplied by the computer manufacturers for translating the program JAVA written in high level language into the equivalent machine code of the computer. This process of translating is called compilation. The compilation process consists of first loading the computer with the compiler & then inputting the source program. The compiler produces an object program whose extension is .OBJ.
It translates the program line by line.
It translates the entire program at once.
It requires less main memory.
It requires more main memory
Each time the program is executed, every line is checked for syntax or error and converted to equivalent machine code.
It converts the entire program to machine code, when all the syntax error are removed and executes the object code directly.
Source program and the interpreter are required for execution.
Neither source program nor compiler are required for execution.
It is good for fast debugging & testing.
It is slow for debugging & testing.

No comments:

Post a Comment