C programming flashcards
The small, fast language under operating systems, devices and other languages.
What is C, in one plain sentence?
C is a programming language from the 1970s that turns into very fast programs and lets you control the computer's memory directly.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What C is and why it matters4 cards
- Key words4 cards
- Getting ready3 cards
Core basics
- Compiling and running2 cards
- Variables and types3 cards
- Control flow3 cards
- Functions2 cards
- Arrays and strings3 cards
- Structs, pointers and exit codes4 cards
Next steps
- Memory management3 cards
- Pointers in depth4 cards
- Files and errors2 cards
- Program structure3 cards
- Data structures in C2 cards
- Debugging tools2 cards
Go deeper
- Undefined behaviour3 cards
- Memory layout and performance3 cards
- Security3 cards
- Concurrency2 cards
- Modern C (C23)3 cards
- Systems programming2 cards
Final test and certificate
10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.
Take the final testAbout these cards
- Reviewed 26 October 2026
- CoversC23 (ISO/IEC 9899:2024)GCC 15Clang 21
Checked against
C programming at a glance
C is a small, fast programming language that talks almost directly to the computer's memory, used to build operating systems, devices and the tools other languages run on.
Like driving a manual car: you control the gears yourself, which gives speed and control, but stalling is your own fault.
Words you will meet
- Compiler
- The tool (like
gcc) that turns your C text into a program the computer runs - Source file
- The
.ctext file where you write your code - Variable
- A named box in memory that holds a value
- Type
- The kind and size of value a box holds, like a whole number or a letter
- Function
- A named set of steps that takes inputs and gives back a result
- Memory address
- The house number of a box in the computer's memory
- Pointer
- A variable that holds a memory address, so it points at another box
- Header file
- A
.hfile that lists functions you can use, likestdio.hfor printing
The steps
- 1. Start from zero (11 cards): What C is, where it runs, and memory as numbered lockers.
- 2. Core basics (17 cards): Compiling, types, control flow, functions, arrays, strings, structs and first pointers.
- 3. Next steps (16 cards): Heap memory, pointers in depth, files, errors, headers, macros, lists and debugging tools.
- 4. Go deeper (16 cards): Undefined behaviour, layout and cache, security, threads, C23 and system calls.
All 11 cards in Start from zero
- What is C, in one plain sentence?
- C is a programming language from the 1970s that turns into very fast programs and lets you control the computer's memory directly.
- Why was C created?
- At Bell Labs in the early 1970s, Dennis Ritchie made C to rewrite the Unix operating system so it could move to new computers without being rewritten in each machine's own code.
- Where do you meet C without knowing it?
- Inside microwaves, cars, routers and smart watches (tiny chips), in the core of Linux and Windows, in phone operating systems and in tools like Git and SQLite.
- What everyday picture helps you understand C's memory?
- A long street of numbered lockers. Each locker holds one small value, and its number is the address. C lets you open any locker by its number, which is powerful and risky.
- What is a pointer, in plain words?
- A note that says where another box lives instead of holding the value itself, like a slip of paper with a locker number written on it.
- What does the compiler do for C?
- It reads your
.cfile, checks it for mistakes, and turns it into a program file made of machine instructions that run directly on your computer. - What is a header file like
stdio.h? - A list of ready-made functions you are allowed to use.
stdio.hbrings in printing and reading; you add it with#includeat the top. - Why does C want to know each value's type?
- Because the type tells C how many bytes to use and how to read them. A letter needs 1 byte, a whole number usually 4.
- What do you need to start writing C?
- A free compiler (
gccon Linux, Xcode tools withclangon Mac, or MSYS2 or Visual Studio on Windows) and any text editor. Nothing to buy. - What does the classic first C program do?
- It includes
stdio.h, starts atmain, prints one line withprintfand returns 0 to say it finished fine. - What will you be able to do after this topic?
- Write and debug real C programs, understand how memory works under every language, read systems code, and move on to C++, embedded devices or operating systems.
C programming cheatsheet
Build and debug
gcc -std=c23 -Wall -Wextra -o app app.cCompile with warningsgcc -g -O0Debug build for gdb-fsanitize=address,undefinedCatch memory and UB bugsgcc -c a.c && gcc a.o b.o -o appCompile, then linkgdb ./app, run, btBacktrace after a crashvalgrind --leak-check=full ./appFind leaks (Linux)
printf formats
%d / %ld / %lldint / long / long long%u / %zuunsigned / size_t%.2fdouble, two decimals%c / %sOne char / a string%pPointer address%x / %08xHex / hex padded to 8
Pointers and memory
int *p = &x;Pointer to x*p = 5;Write through pointerp->fieldSame as(*p).fieldmalloc(n * sizeof *p)Allocate n itemscalloc(n, sizeof *p)Allocate n zeroed itemsfree(p); p = NULL;Release and clear
Strings (string.h)
strlen(s)Length without the zero bytesnprintf(buf, sizeof buf, "%s", s)Safe copy or formatstrcmp(a, b) == 0Same textstrchr(s, ',')Find a characterfgets(buf, sizeof buf, stdin)Read a line safelymemcpy(dst, src, n)Copy n bytes
C23 at a glance
bool, true, false, nullptrNow keywordsconstexpr int N = 10;Compile-time constantauto x = 5; typeof(x) y;Type inference[[nodiscard]]Warn on ignored resultckd_add(&r, a, b)Overflow-checked add#embed "file.bin"Include file bytes