ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the difference between compiler and interpreter?

user-image
تم إضافة السؤال من قبل Gurmeet Mathur , Freelance Developer/Designer , Scriptlance.com
تاريخ النشر: 2013/11/24
JEYA SHOBANA SUBBIAH
من قبل JEYA SHOBANA SUBBIAH , Assistant Professor , Rajas International Institute of Technology for Women

A compiler just checks all syntax errors of a source program. If the source program has no errors then it transforms the source code into machine code (binaries) and then the program can be executed by invoking several library commands and a linker. An interpreter simply checks the errors of a program statement by statement. It cannot consider the whole program as a single unit.

karpaga selvi Subramanian
من قبل karpaga selvi Subramanian , Assistant Professor , Mekelle University

Interpreter performs step by step translation, and stops when a error occurs.

Compiler translate the entire program and highlight all errors if any

Shafi Ahmad
من قبل Shafi Ahmad , Principal Software Engineer , Microsoft India Pvt Ltd

 

Input

Compiler Takes Entire program as input

Interpreter Takes Single instruction as input .

Intermediate Code

Intermediate Object Code is Generated

No Intermediate Object Code is Generated

Compilation

Program need not be compiled every time

Every time higher level program is converted into lower level program

Error Report

Compiler gives you list of all errors after compilation of whole program.

Interpreter stops the translation at the error generation and will continue when error get solved.

Machine code

Compiler converts the entire program to the machine code when all the errors are removed, execution takes place.

Each time the program is executed; every line is check for error and then converted into equivalent machine code.

Debugging

Compiler is slow for debugging.

Interpreter is good for fast debugging.

Execution Time

Compiler takes less execution time.

Interpreter takes more execution time.

Speed

Compiler is faster.

Interpreter is slower in compare to compiler.

Example

C Compiler

BASIC

 

 

المزيد من الأسئلة المماثلة