# Learn C > Free C tutorials, plus a catalogue of the memory-safety bugs language models reliably introduce in C, and how to catch them. Canonical: https://learn-c.net/ Licence: content free to read and quote with attribution to Learn C (https://learn-c.net/). Maintainer: Code Learning Dojo. Last built 2026-09-06. ## Foundations The syntax and the mental model. Short, runnable, no fluff. - [Hello, World!](https://learn-c.net/hello-world/): The C programming language is a general purpose programming language, which relates closely to the way machines work. - [Variables and Types](https://learn-c.net/variables-and-types/): C has several types of variables, but there are a few basic types: The different types of variables define their bounds. - [Arrays](https://learn-c.net/arrays/): Arrays are special variables which can hold more than one value under the same variable name, organised with an index. - [Multidimensional Arrays](https://learn-c.net/multidimensional-arrays/): In the previous tutorials on Arrays, we covered, well, arrays and how they work. - [Conditions](https://learn-c.net/conditions/): In life, we all have to make decisions. In order to make a decision we weigh out our options and so do our programs. - [Strings](https://learn-c.net/strings/): Strings in C are actually arrays of characters. - [For loops](https://learn-c.net/for-loops/): For loops in C are straightforward. They supply the ability to create a loop - a code block that runs multiple times. - [While loops](https://learn-c.net/while-loops/): While loops are similar to for loops, but have less functionality. - [Functions](https://learn-c.net/functions/): C functions are simple, but because of how C works, the power of functions is a bit limited. - [Static](https://learn-c.net/static/): static is a keyword in the C programming language. It can be used with variables and functions. By default, variables are local to the scope in which they are defined. - [Enums, typedef and const](https://learn-c.net/enums-typedef-const/): Three small features that decide how readable a C codebase is — and one of them is your only real defence against accidental mutation. - [Pointers](https://learn-c.net/pointers/): Pointers are also variables and play a very important role in C programming language. They are used for several reasons, such as: And many more. - [Structures](https://learn-c.net/structures/): C structures are special, large variables which contain several named variables inside. Structures are the basic foundation for objects and classes in C. - [Function arguments by reference](https://learn-c.net/function-arguments-by-reference/): Assumingly you’re already know pointers and functions, so you are aware of that function arguments are passed by value, which means they are copied in and out of functions. - [Dynamic allocation](https://learn-c.net/dynamic-allocation/): Dynamic allocation of memory is a very important subject in C. It allows building complex data structures such as linked lists. - [Arrays and Pointers](https://learn-c.net/arrays-and-pointers/): In a previous tutorial on [[Pointers]], you learned that a pointer to a given data type can store the address of any variable of that particular data type. - [Recursion](https://learn-c.net/recursion/): Recursion occurs when a function contains within it a call to itself. Recursion can result in very neat, elegant code that is intuitive to follow. - [Linked lists](https://learn-c.net/linked-lists/): Linked lists are the best and simplest example of a dynamic data structure that uses pointers for its implementation. - [Binary trees](https://learn-c.net/binary-trees/): A Binary Tree is a type of data structure in which each node has at most two children (left child and right child). - [Unions](https://learn-c.net/unions/): C Unions are essentially the same as C Structures, except that instead of containing multiple variables each with their own memory a Union allows for multiple names to the same variable. - [Pointer Arithmetics](https://learn-c.net/pointer-arithmetics/): You previously learned what is a pointer and how to manipulate pointers. In this tutorial you will be learning the arithmetic operations on pointers. - [Function Pointers](https://learn-c.net/function-pointers/): Remember pointers? We used them to point to an array of chars then make a string out of them. - [Bitmasks](https://learn-c.net/bitmasks/): Bit masking is simply the process of storing data truly as bits, as opposed to storing it as chars/ints/floats. - [File I/O](https://learn-c.net/file-io/): Reading and writing files in C, and the error checks that generated code omits every single time. - [The Preprocessor](https://learn-c.net/preprocessor/): Textual substitution that runs before the compiler sees your code — powerful, and the source of a specific family of bugs. ## AI-Native Configuring agents, harnesses and feedback loops for this language. Updated as the tooling moves. - [Setting up a coding agent for a C project](https://learn-c.net/ai/agent-setup/): In C the review is not optional, so the setup is about making the machine do as much of it as possible. - [Writing an AGENTS.md for C](https://learn-c.net/ai/agents-md/): The one language where the instructions file should be blunt, specific, and mostly about memory — because the compiler will happily accept everything it forbids. - [Local inference economics: where the cost is memory bandwidth](https://learn-c.net/ai/tokenomics/): Nobody calls a hosted model from C. If C is in your stack, you are running the model — and the currency is not tokens, it is bytes moved per second. ## Review & Verify How generated code fails in this language, and the checks that catch it before your users do. - [The C mistakes language models actually make](https://learn-c.net/review/failure-modes/): In most languages a generated bug is a wrong answer. In C it is a vulnerability. This is the catalogue, and the tooling that makes it survivable. - [Dependency hygiene in C, where there is no package manager](https://learn-c.net/review/dependencies/): No registry means no slopsquatting — and also no lockfile, no audit command, and no automatic way to learn that the library you vendored in 2022 has a CVE. - [Security review for generated C beyond memory safety](https://learn-c.net/review/security/): The memory bugs have their own catalogue. This is the rest of the threat model: input you did not validate, privilege you did not drop, and races you did not know were there. - [The performance traps in generated C](https://learn-c.net/review/performance/): In C the compiler is a better optimiser than you are, so the interesting problems are the ones it cannot fix: memory layout, allocation in hot loops, and asking the wrong question. ## Reference pages - [About Learn C, and how we make money](https://learn-c.net/about/): Editorial policy, sourcing, corrections and affiliate disclosure for Learn C, part of the Code Learning Dojo network. - [The C stack we would set up today](https://learn-c.net/tools/): An opinionated C toolchain: sanitizers, static analysis, fuzzing, build systems, and the compiler flags that turn silent corruption into a stack trace.