TodayTools

C programming flashcards

The small, fast language under operating systems, devices and other languages.

Donate
Beginner friendly, starts from zero
Section
How to study
0
C programmingStart from zero · 1 of 11

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.

Old, small, fast and everywhere.
Show again
11 left
Got it

Tap to turn over. Swipe right if you know it, left to see it again.

All topics

What you will learn

  1. Start from zero

    • What C is and why it matters4 cards
    • Key words4 cards
    • Getting ready3 cards
  2. 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
  3. Next steps

    • Memory management3 cards
    • Pointers in depth4 cards
    • Files and errors2 cards
    • Program structure3 cards
    • Data structures in C2 cards
    • Debugging tools2 cards
  4. 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 test

About these cards

  • Reviewed 26 October 2026
  • CoversC23 (ISO/IEC 9899:2024)GCC 15Clang 21
How these cards are made

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 .c text 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 .h file that lists functions you can use, like stdio.h for printing

The steps

  1. 1. Start from zero (11 cards): What C is, where it runs, and memory as numbered lockers.
  2. 2. Core basics (17 cards): Compiling, types, control flow, functions, arrays, strings, structs and first pointers.
  3. 3. Next steps (16 cards): Heap memory, pointers in depth, files, errors, headers, macros, lists and debugging tools.
  4. 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 .c file, 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.h brings in printing and reading; you add it with #include at 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 (gcc on Linux, Xcode tools with clang on 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 at main, prints one line with printf and 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.c Compile with warnings
  • gcc -g -O0 Debug build for gdb
  • -fsanitize=address,undefined Catch memory and UB bugs
  • gcc -c a.c && gcc a.o b.o -o app Compile, then link
  • gdb ./app, run, bt Backtrace after a crash
  • valgrind --leak-check=full ./app Find leaks (Linux)

printf formats

  • %d / %ld / %lld int / long / long long
  • %u / %zu unsigned / size_t
  • %.2f double, two decimals
  • %c / %s One char / a string
  • %p Pointer address
  • %x / %08x Hex / hex padded to 8

Pointers and memory

  • int *p = &x; Pointer to x
  • *p = 5; Write through pointer
  • p->field Same as (*p).field
  • malloc(n * sizeof *p) Allocate n items
  • calloc(n, sizeof *p) Allocate n zeroed items
  • free(p); p = NULL; Release and clear

Strings (string.h)

  • strlen(s) Length without the zero byte
  • snprintf(buf, sizeof buf, "%s", s) Safe copy or format
  • strcmp(a, b) == 0 Same text
  • strchr(s, ',') Find a character
  • fgets(buf, sizeof buf, stdin) Read a line safely
  • memcpy(dst, src, n) Copy n bytes

C23 at a glance

  • bool, true, false, nullptr Now keywords
  • constexpr int N = 10; Compile-time constant
  • auto x = 5; typeof(x) y; Type inference
  • [[nodiscard]] Warn on ignored result
  • ckd_add(&r, a, b) Overflow-checked add
  • #embed "file.bin" Include file bytes
Donate