C is a compiled language. You write source, a compiler turns it into machine code, then the CPU runs that file.
C is a language you write as text, then a compiler turns into a program the computer can actually run. Nothing happens until you compile and then start that program. This page is that whole journey in one picture: write, compile, run, see output.
.c source file with #include, main, and statements.gcc hello.c -o hello. Fix any errors the compiler prints.printf sends text to standard output.plain text you type
The compiler has not run yet.translate to machine code
Errors here are compile-time, not runtime.a file the OS can load
On Windows this is often hello.exe.CPU executes main()
printf sends characters to the terminal.Hello, Kodin!
return 0 tells the OS the program succeeded.Each step highlights the matching C line. Program output appears only when a line that prints actually runs.
Five questions. Pick one answer each, then Check answers. The correct choice turns green.
1. What does gcc do to hello.c?
C is compiled. gcc writes a machine-code file you then run.
2. Where does a hosted C program start?
The operating system calls main.
3. What does return 0 from main usually mean?
By convention 0 means success.
4. A .c file by itself is:
Source is text until you compile.
5. printf is declared in which header?
Standard input/output lives in stdio.h.