The difference between compiler and interpreter is given below.
Compiler – Compiler Takes Entire program as input and then covert into machine language then this machine language program executed by computer’s processor. Here conditional control statement execute faster than interpreter. It generates error and warning report after translation of the entire code. It takes more memory compare to interpreter code since it generate object code. Need not compile every time once program is compiled. Example – C , C++
Interpreter – Interpreter Takes Single instruction as input. Here no intermediate code is generated so it takes less memory. Execution of code is slower than compiler as interpreter code is executed line by line. It stopped further code scan once error is encountered. Errors are displayed for every instruction interpreted (if any). Every time higher level program is converted into lower level program. Example – Python