Super Easy Short Computer Notes To Improve Computer Literacy and Your IT Skills

Sponsored Links

Friday, March 23, 2018

Explain Difference Between Compiler and Interpreter

Leave a Comment

Difference between Compiler & Interpreter

Detailed difference between compiler and interpreter
Detailed difference between compiler and interpreter

Compiler                                    Interpreter                             
1.    Compiler   converts   a   program   into machine code as a whole.                                 1.  Interpreter    converts    a    program    into machine code one statement at a time.           
2. Compiler after translating whole source program, creates object code file.   2. Interpreter does not create object code file. It only creates executable code for only one statement currently interpreted, which is executed. next time second statement is executed and so on. No object file is created.
3. Program execution is fast. Since once program is compiled successfully, an object code file is produced. Now this object code file is executed. No need of re-compilation unless we change the source code.

                      
3. Program execution is slow. Because every time we want to run a program it is interpreted again.                         
4. Error detection and removal is comparatively difficult. Because, compiler will show a list of all errors in the whole program. Therefore, sorting out every error individually and removing the cause of error becomes more difficult and time consuming.
                   
4. Error detection and removing error is easy in case of interpreter, because interpreter will show when error at a time and its location in program. So that the programmer can easily catch and remove error.                           
5. More programming languages use compilers for translating source code to object code. 5. The number of high level programming languages that use Interpreter as an option to translate source code into object code is relatively smaller.
6. In compiled high level programming languages program execution does not require Translator or compiler for every execution. Because after first time of compilation, object code file is available that is used subsequently for onward program executions unless we change the source code. In case of change of source code, we need to re-compile the source code to show changes in the object code also. 6. In interpreted high level programming languages, translator program is needed every time for execution of the source program.


You would also like to read:

Types of Language Processors / Language Translators / Compiler, Interpreter, assembler

0 comments:

Sponsored Links

Featured Post

Short Notes on Microsoft Word's Important Practicals Part - I

Microsoft is one of the most popular word processing software by Microsoft. It is used to prepare different types of documents efficiently...

.