Skip to content

Source code

Source code is the human-readable code that we write.

For example, a C source file may look something like this:

#include <stdio.h>
int main() {
printf("I'm a source file!\n");
return 0;
}

If we save this code in a file called example.c, then example.c is the source code for our program.

But if we compile the program into a binary called example, then example is not the source code - it’s the compiled binary version of the source code, which is not human-readable.

In short, source code is the code we write, before it’s compiled or interpreted into a form that the computer can execute.