Compiler and interpreter both are tools to translate source code from high-level language to machine language. Both does the same task of translation. But the working mechanism of compiler is different from interpreter. Below are some differences between compilers and interpreters
A Compiler is a program or set of programs that converts source code written in a high-level language to low-level language (assembly language or machine language). A programming language can have many compilers. For example – GCC C, Turbo C, Quick C etc. are different compilers for C programming language.