Difference between Interpreter and Compiler
Computer does not understands our human languages. It understands only binary language. All the input we feed in the computer is converted into binary language.
The programming languages e.g. Basic, C, C++ are either compiler based or interpreter based.
An Interpreter is a program which converts the higher level language in lower level language or assembly language or binary language i.e. the language of 0′s and 1′s. It reads one line of code at a time, converts it into binary language and then runs the code on the machine. So the initial start up time to run the program is almost negligible. If there is any error on the middle of the program then the program is interrupted in between. After removing the error the programs needs to run again from the beginning. Languages like BASIC is interpreter based languages. So in this interpreter converts one line of code at a time, and then runs it.
A compiler is also a program which convert the higher level language in lower level language. In case of compiler, it reads a whole block of code at a time, converts it into executable code, and runs the code. The initial start up time to run program is more as compared to Interpreter. Once the code is compiled, then the initial start up time to run the program is negligible. Languages like C, C++ are compiler based languages.