Forum for Week-1

Difference between Compiler and Interpreter.

Re: Difference between Compiler and Interpreter.

by Raisul Islam -
Number of replies: 0
Interpreter:
1.Interpreter translates just one statement of the program at a time into machine code.
2.An interpreter takes very little time to analyze the source code. However, the overall time to execute the process is much slower.
3.Translates program one statement at a time.
4.Considering it scans code one line at a time, errors are shown line by line.
5.It requires source code for later execution.
Python, Ruby, Perl, SNOBOL, MATLAB, etc.

Compiler:
1.Compiler scans the entire program and translates the whole of it into machine code at once.
2.A compiler takes a lot of time to analyze the source code. However, the overall time taken to execute the process is much faster.
3.Compiler scans the whole program in one go.
4.Main advantage of compilers is their execution time.
5.It converts the source code into object code.
Eg. C, C++, C#, etc.