Thursday, 31 May 2012

Compilers and interpreters

When we work with high level language then to work on computer it must be translated into machine language. There are 2 kinds of translator- compilers & interpreters.
High level languages are called either compiled language or interpreted languages.
In computers there are so many languages which use compilers and interpreters.
Ex. C, C++ etc are the compiled language.
Basic,Visual basic is an interpreted language


Compilers : In a compiled language, a translation program is run to convert the programmers entire high-level program, which is called the source code, into a machine language code. This translation is called compilation. The machine language code is called the object code and can be saved and code can be run immediately or later.
Interpreter : In an interpreter language, a translation program converts each program statement into machine statement one by one and execute it. Translation and execution occurs immediately, but at a time it executes only statement. Unlike compiler it does not create an object code & store it. These means in a program where one statement is executed several that statement is converted to machine language each time it is executed

No comments:

Post a Comment