What is a compiler?
In short
A compiler turns the code you write into instructions a computer can run. Languages like C, C++, Java and C# are compiled before they run.
Computers don't understand C or Java; they understand machine instructions. A compiler reads your whole program, checks it for mistakes and translates it. If it finds an error, like a missing semicolon, it refuses to build the program and tells you where the problem is.
Python and JavaScript don't need a separate compile step: an interpreter reads and runs the code for you. Either way, the result is the same: your code becomes something the computer can actually do.
C
A C program: the compiler turns this into a program you can run
#include <stdio.h>
int main(void) {
printf("Hello, World!\n");
return 0;
}Output
Hello, World!Learn it properly
These free lessons teach it step by step, with questions and a program you write yourself.
Try your first lesson free
Codiqo teaches coding in five-minute lessons with real code. Free on the web, iPhone and Android.