compiler vs interpreter:difference b/w compiler & interpreter

compiler vs interpreter:difference b/w compiler & interpreter

Generally we write computer program in high level language.High level language is understood by humans.But problem is that computer doesn't understand high level language.Program that written in high language is called source code.Computer understand machine language. .So in order to interact with computer we need a tool or software that convert high level language in to  machine language (language which can understood by computer) and that software is called compiler or interpreter.
Compiler-Compiler  is a software that translate high level language to equivalent low level language (source code to object code).Compiler also reports list of error in the source code.
Interpreter-These are the small program compare to the compiler that translate source code line by line and hold when encounter an error hence debugging is easy. It take less time to analyze source code compare to compiler.
No intermediate source code generated hence are more memory efficient.
Programming language like Ruby and python use interpreter.

Comments