The C Guide
By Flavio Copes
Learn C programming from scratch: variables, pointers, arrays, strings, structures, and the preprocessor. A guided path through the C tutorials on this site.
C is one of the most influential programming languages ever created.
It powers operating systems, databases, embedded devices, and the interpreters and runtimes of most other languages. Learn C and you understand how software actually talks to memory and hardware.
C is also remarkably stable. The language you learn today is essentially the language that has run the world for decades. That makes these tutorials solid ground: the fundamentals don’t move.
This page is your map to the C content on this site, organized as a learning path.
Where to start
Follow these in order and you’ll cover the core of the language:
- Introduction to the C Programming Language sets the stage, with your first program
- C Variables and types covers how data is stored
- C Operators for math, comparison, and logic
- C Conditionals with
ifandswitch - How to work with loops in C covers
for,while, anddo while - Introduction to C Functions to organize your code
- Introduction to C Pointers is the topic that defines C. Take your time here.
Arrays and strings
In C, strings are arrays of characters, so these two topics go together:
- Introduction to C Arrays
- How to determine the length of an array in C
- Looping through an array with C
- Introduction to C Strings
- How to find the length of a string in C
- How to return a string from a C function
- Double quotes vs single quotes in C
- How to check a character value in C
Types, scope, and structure
Once you’re comfortable with the basics, these round out your understanding of how C programs are built:
- C Constants
- Booleans in C
- How to use NULL in C
- C Enumerated Types
- C Structures
- The typedef keyword in C
- Scope of variables in C
- C Global Variables
- Static variables in C
- Can you nest functions in C?
Input, output, and the toolchain
C programs talk to the outside world through standard I/O, and the preprocessor and header files hold everything together:
- Basic I/O concepts in C
- C conversion specifiers and modifiers
- Print the percentage character with printf() in C
- How to access the command line parameters in C
- C Header Files
- The C Preprocessor
- Fix the C ‘implicitly declaring library function’ warning
Go deeper
I collected all of this material, expanded and organized, in the free C Handbook. You can download it as PDF or EPUB and read it offline, cover to cover.
All posts on this topic are in the C tag archive.
Related posts about clang: