C Programming • C17 baseline, standards-specific features labeled
Set Up a C Compiler and Build Loop
Compile a source file with warnings enabled and run the resulting program.
Install a C compiler such as GCC, Clang, or a compiler provided by your platform tools. Save source code in a file ending in .c. During learning, request a modern standard and enable warnings so the compiler can point out mistakes early.
Example
cc -std=c17 -Wall -Wextra -Wpedantic main.c -o main
./main
What to expect
The first command builds main.c. The second runs the executable named main.
Key idea: Keep the compiler command reproducible; do not rely on an editor silently choosing different flags.