Skip to main content

Questions about programs that read code in one language (source language) and translate it into an equivalent program in another language (target language).

A compiler is a program that transforms source code written in a programming language (the source language) into another language (the target language).

Example: A C++ compiler transforms your C++ code into equivalent Assembly Language or Machine Code.

A rough sketch of working of compilers

Source Program (or Code) → Compiler → Target Program (or executable code)


Compilers are more generally used to translate high-level code (like C#, C++, Java) into low level or machine code.