C tutorial
Learn C Programming with Interactive Tutorials
A beginner C course: variables, pointers, structs, and files. Compile with gcc in the browser, then read stdout or the compiler messages. Try it Yourself opens /c/try.
45 chapters, plus bootcamp labs at /c/labs. The editor is /c/try.
Topics
Start at intro, or jump to pointers, files, or projects.
Start
Compile your first program
Intro · Syntax · OutputData
Types, strings, and input
Variables · scanf · StringsControl
Decisions and loops
If · While · ForMemory
Addresses and collections
Arrays · Pointers · mallocFunctions
Reuse work without copy-paste
Functions · RecursionMore
Files, headers, preprocessor
Files · Headers · ExamplesAdvanced
100+ programs to compile
Examples · Bitwise · TimeProjects
Ten programs you can finish
Calculator · Bank · Tic-Tac-ToeBootcamp
Question, hint, solution, Check
Labs · Hints · gcc CheckWhat you get in this tutorial
- gcc in the browser. The right pane is stdout and compiler messages.
- Its own editor. Lessons are under /c. The compiler is /c/try.
- A chapter path. Change the source, compile, press Next.
- Worked examples. Chapters finish with lab-style programs: speeds, pH, marks — not only
int x = 3. - Bootcamp labs. A split screen at /c/labs: question and hint on the left, your code plus Run and Check on the right.
Lesson sequence
Every C lesson, in order.
- 01C Intro
- 02Get Started
- 03C Syntax
- 04C Output
- 05C Comments
- 06C Variables
- 07User Input
- 08Data Types
- 09C Constants
- 10C Operators
- 11C Strings
- 12C Math
- 13C Booleans
- 14If Else
- 15C Switch
- 16While Loop
- 17For Loop
- 18Break Continue
- 19C Arrays
- 202D Arrays
- 21C Structures
- 22C Enums
- 23C Unions
- 24C Pointers
- 25C Memory
- 26C Sizeof
- 27C Functions
- 28Function Parameters
- 29C Recursion
- 30Function Pointers
- 31C Files
- 32C Typedef
- 33Preprocessor
- 34Header Files
- 35C Examples
- 36Ternary Operator
- 37Nested Loops
- 38C Const
- 39C Static
- 40C Scope
- 41Command Line
- 42C Time
- 43String Functions
- 44Type Conversion
- 45Bitwise