Skip to main content

Explain Difference Between Compiler and Interpreter

Difference between Compiler and Interpreter

The Compiler and Interpreter are the two main types of Language Translator or Language Processor
Explain differences between compiler and interpreter in detail
Explain some important differences between Compiler and Interpreter


or Differentiate between Interpreter and Compiler


Compiler                                    Interpreter                             
1.    Compiler   converts   a   source program   into machine code as a whole.                                 1.  Interpreter    converts    a    source program    into machine code one statement at a time.           
2. Compiler after translating whole source program, creates object code file, that can be executed.   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 translated and 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 error 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


Comments

Popular posts from this blog

Explain Main Difference Between System Software and Application Software

Topic: Explain Main Difference Between System Software and Application Software            Differentiate between system software and application software Before , explaining the main differences between application software and system software, let us know the definitions of Application software and System software with examples. What is System Software: System software is a set of programs to control all components of computer and to manage overall operations of computer system. Differences between System software and application software System software is used as a base to install and run all application software. Examples of system software include: Operating Systems, like Microsoft Windows, DOS, Unix and Linux Device Drivers like Device driver software of a Printer (found on CD normally provided with the printer) Utility Programs like AVAST anti virus, Disk Scanners and File Viewers etc. What is Applicat...

Explain Data Processing Cycle and Main Activities of Data Processing Cycle

After collecting data, it is processed to convert into information. The data is processed again and again until accurate result is achieved. This is called data processing cycle . Data processing cycle involves following three basic activities: Major Activities Involved in Data Processing Cycle Explain Data processing cycle 1. Input 2. Processing 3. Output 1. INPUT It is the process in which collected data is given to computer after converting into binary form. Input step can be further divided into following steps: i) Planning Here objectives of data processing are defined. For example, in examination system, objective is to process student examination data to get result cards. ii) Data Collecting Here data is collected. Data is the raw material for data processing. This must be accurate for getting accurate results. iii) Input Here data is entered into computer. iv) Verification Here collected data is verified to determine whether it is valid for ...

Advantages and Disadvantages of Mesh Topology

Topic: Advantages and Disadvantages of Mesh Topology Mesh Topology In a mesh topology, every device on the network is physically connected to every other device on the network. Therefore, data can be sent on several possible paths from source computer to destination computer. Mesh topology is more reliable with better performance. Mesh Network Topology is mostly used in wide area networks where reliability is important. Advantages of Mesh Network Topology 1. Since, there are many links to transfer data, Mesh topology gets rid of the traffic problem . Data may be transferred through different links. 2. If one link becomes unusable, it does not disturb the whole system . Other links can be used for communication. 3. Since each node has physical connection with other nodes, therefore, one node can transfer data to many nodes at the same time. Disadvantages of Mesh Network Topology 1. It is very expensive due to implementation of multiple links for each no...