C fundamentals are the pieces every program is built from: a program structure with main, the syntax rules the compiler enforces, variables and data types that hold values, and input/output with printf and scanf. Master these first and every later topic (loops, pointers, structs) becomes easier to read.
Compile early, compile often.
Run gcc file.c -std=c11 -Wall -Wextra -o out after every small change. Warnings catch uninitialized variables and wrong format specifiers before they become bugs.
Path
Learning Path
Work through the stages in order, or jump to a topic from the index below (11 tutorials).
Using %d for a double (or %f for an int) is undefined behavior. Match the specifier to the type.
init
Uninitialized variables
A local variable holds garbage until you assign it. Always give variables a value before reading them.
int/
Integer division
5 / 2 is 2, not 2.5. Make one operand a double when you need a fraction.
Remember
Key Takeaways
Structure: every program starts at main.
Types: choose the smallest type that clearly fits your data.
Output: match each format specifier to its argument type.
One line: C fundamentals are the pieces every program is built from: a program structure with main, the syntax rules the compiler enforces, variables and data types that hold values, and input/output with printf and scanf.
Frequently Asked Questions
Start with program structure and syntax, then variables, data types, and printf/scanf. After that, move to operators, control statements, and loops.
No. A text editor, a terminal, and GCC or Clang are enough. Any online C compiler also works for the short examples.
Examples compile with C11 (-std=c11). Features from C99 such as // comments and mixed declarations are noted where they appear.