We generally write a computer program using a high-level language. A high-level language is one that is understandable by us, humans. This is called source code.
However, a computer does not understand high-level language. It only understands the program written in 0's and 1's in binary, called the machine code.
We need to convert the source code into machine code. And, this is accomplished by using a compiler or an interpreter. They convert a program written in a high-level language into machine code understood by computers.
However, there are differences between how an interpreter and a compiler works.
Interpreter | Compiler |
---|---|
Translates program one statement at a time. | Scans the entire program and translates it as a whole into machine code. |
It takes less amount of time to analyze the source code but the overall execution time is slower. | It takes a large amount of time to analyze the source code but the overall execution time is comparatively faster. |
Continues translating the program until the first error is met, in which case it stops. Hence debugging is easy. | It generates the error message only after scanning the whole program. Hence debugging is comparatively hard. |
Programming languages like Python, Ruby use interpreters. | Programming languages like C, C++, Java use compilers. |
No intermediate object code is generated, hence are memory efficient. | Generates intermediate object code which further requires linking, hence requires more memory. |
you want contact me so fill form and send me
IF YOU HAVE ANY QUESTION CONTACT MY GMAIL ACCOUNT OR MESSAGE MY FACEBOOK ACCOUNT