Answer: No. A C program (source code) cannot be executed by the computer directly; it must first be compiled into machine code.
The computer's processor understands only machine language (binary 0s and 1s). A C program is written in a high-level language that humans can read, so it has to be translated:
- Preprocessing: handles
#include,#define, etc. - Compiling: the compiler translates the C source file (
prog.c) into machine code, an object file (prog.obj/prog.o). - Linking: the linker joins it with library code (for example the code for
printf) to make an executable file (prog.exe/a.out). - Loading and running: the loader places the executable in memory and the CPU executes it.
Only this final executable file is run directly by the computer.