What is Interpreter and Compiler
Compiler | Interpreter |
---|---|
Compiler scans the whole program in one go. | Translates program one statement at a time. |
Main advantage of compilers is it’s execution time. | Due to interpreters being slow in executing the object code, it is preferred less. |
It converts the source code into object code. | It does not convert source code into object code instead it scans it line by line |
Eg : C, C++, C# etc. | Eg : Python, Ruby, Perl, SNOBOL, MATLAB, etc. |