|Executes the whole program in a single run||Executed the program line by line|
|Created object file(.obj) while compiling||No object file is created|
|Faster execution of statements as compared to interpreter||Slower execution of statements than compiler|
|Error gets displayed only after compiling the program||Error gets displayed at the time of writing the instructions|
|Examples: C, C++, JAVA etc.||Examples: PYTHON, RUBY etc.|
Compilers and Interpreters are used to convert high level language into machine language (0’s and 1’s) . High levels language are those which contains english words. Examples of some high level programming languages are C, JAVA, PYTHON etc. Since , Computer can work only with 0’s and 1’s(Machine Level) therefore we need to convert those program written in high level to machine level so that computer can execute those instructions. That’s why we need to use compiler and interpreter.