Compiler in C
Compiler in C
A compiler is system software which converts programming language code into binary format in single steps. In other words Compiler is a system software which can take input from other any programming language and convert it into lower level machine dependent language.
It is system software which is used to convert programming language code into binary format in step by step process.
An assembler is system software which is used to convert the assembly language instruction into binary format in step by step process. An assembler is system software which is used to convert the assembly language instruction into binary format.
Difference Between Compiler and Interpreter
|Input||Compiler takes Entire program as input at a time.||Interpreter takes Single instruction as input at a time.|
|Output||Intermediate Object code is generated||No Intermediate Object code is generated|
|Speed||It execute conditional control statements fastly.||It execute conditional control statements slower than Compiler|
|Memory||More memory is required. Due to the creation of object code.||Less memory is required. It does not create intermediate object code.|
|Need Compile||Program need not to be compiled every time||Every time higher level program is converted into lower level program|
|Error||It display error after entire program is checked||It display error after each instruction interpreted (if any)|
|Example||Example: C||Example: BASIC|
|Error Detection||Difficult||Easier Comparatively|
|Pertaining Programming languages||C, C++, C#, Scala, typescript uses compiler.||PHP, Perl, Python, Ruby uses an interpreter.|
We can also see in below images Difference Between Compiler and Interpreter.