xSKILLby Infirals
Register

C for Beginners

C24 lessons4 hr 50 min

Learn C from a blank file to functions, pointers, and strings through short programs you compile and run yourself.

Modules

Lessons open in reading order. Each one is a public page.

Starting out

5 lessons

Compile and run a first program, read the parts of a C file, store values in typed variables, and steer execution with decisions and loops.

  1. From source file to running program10 min
  2. The parts of a C program11 min
  3. Variables, types, and values12 min
  4. Operators and decisions11 min
  5. Loops11 min

Arrays, functions and pointers

4 lessons

Collect values in arrays, move code into reusable functions, reach memory through pointers, and group text and fields in strings and structs.

  1. Arrays12 min
  2. Functions12 min
  3. Pointers13 min
  4. Strings and structs14 min

Pointers and memory

6 lessons

Walk arrays with pointer arithmetic, add levels of indirection, allocate and release heap memory, and choose storage classes that match how long a value must live.

  1. Pointer arithmetic and array walking12 min
  2. Pointers to pointers and arrays of pointers12 min
  3. void pointers, NULL, and generic code12 min
  4. malloc, calloc, realloc, free13 min
  5. Stack, heap, and the lifetime of data12 min
  6. Storage classes and linkage11 min

Working with text

3 lessons

Use string.h without its sharp edges, read lines safely with fgets, and build strings inside buffers whose capacity you track.

  1. Inside string.h12 min
  2. Safe input with fgets12 min
  3. Building strings by hand12 min

Records, files and recursion

6 lessons

Model records with nested structs, enums and unions, sort arrays of them, then work with text files, command-line arguments and recursive linked structures.

  1. Nested structs, typedef, and enums12 min
  2. Unions, bit flags, and tagged values13 min
  3. Arrays of structs and passing them to functions12 min
  4. Reading and writing text files13 min
  5. Command line arguments and the preprocessor13 min
  6. Recursion and a first linked list13 min
All notes

Sign in, then read a note for 45 seconds or press Mark as read. Reading progress appears on the notes home and your dashboard.