Compiler vs Interpreter
CompilerInterpreter
Executes the whole program in a single runExecuted the program line by line
Created object file(.obj) while compilingNo object file is created
Faster execution of statements as compared to interpreterSlower 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s