C Course · 57 lessons · approx. 383 minutes

Learn C

C is a programming language for system software, devices and fast programs. A compiler translates your code before it starts. You first learn small outputs and later the difference between a value and its address. Every new building block is first explained on short pages. The coding exercises compare solution patterns without pretending to be a compiler; you can run free programs in the compiler with a suitable runtime.

  • Hallo, C!
  • int and %d
  • Text as a string
  • Calculating and +=
  • if and else
  • while: as long as it is true
  • Arrays and fixed limits
  • A function with a result
  • Pointers: value and address
  • Your C points coach
  • struct: the data of a round
  • enum: states with names
  • Pointers: the address of a number
  • sizeof: counting elements in a fixed array
  • for: looping through an array
  • string.h: working with texts
  • Pointers as parameters: swapping values
  • malloc and free: managing memory yourself
  • switch: cases by value
  • Computing an array size from sizeof
  • Reading data through a const pointer
  • snprintf limits a text output
  • Finding a character with strchr
  • Offering your own type name with typedef
  • Naming program states
  • Declaring functions before using them
  • Requesting initialised memory with calloc
  • Texts and characters
  • Pointers and memory in depth
  • Structuring programs
  • Enumerations and switch
  • Sorting and searching
  • Bits and bytes

What you’ll learn

  1. Chapter 1From the first character to your own value – Starting point, output, variables and calculating.
    Hallo, C! · int and %d · Text as a string · Calculating and +=
  2. Chapter 2Deciding and repeating – Check values and control small sequences.
    if and else · while: as long as it is true · Arrays and fixed limits
  3. Chapter 3Your own building blocks and a mini project – Organise data, build functions and connect what you have learned.
    A function with a result · Pointers: value and address · Your C points coach
  4. Chapter 4Level up: your next practice chapter – Understand four new building blocks in small steps and use them yourself.
    struct: the data of a round · enum: states with names · Pointers: the address of a number · sizeof: counting elements in a fixed array
  5. Chapter 5Master chapter: how real programs are built – Five building blocks from real projects – explained, connected, filled in and written by you.
    for: looping through an array · string.h: working with texts · Pointers as parameters: swapping values · malloc and free: managing memory yourself · switch: cases by value
  6. Chapter 6Project tools: understand and apply – Eight more building blocks with explanation pages and four exercises per lesson.
    Computing an array size from sizeof · Reading data through a const pointer · snprintf limits a text output · Finding a character with strchr · Offering your own type name with typedef · Naming program states · Declaring functions before using them · Requesting initialised memory with calloc
  7. Chapter 7Texts and characters – Count, convert and compare characters, and put texts together.
    Counting characters: strlen and loops · Upper and lower case: toupper from ctype.h · Comparing texts: strcmp · Putting texts together: strcat · Boss: is it a palindrome?
  8. Chapter 8Pointers and memory in depth – Pointer arithmetic, arrays as parameters, the arrow -> and growing memory.
    Pointer arithmetic: walking through an array · Passing arrays to functions · Structures through pointers: the arrow -> · Growing arrays with realloc · Boss: a stack with struct
  9. Chapter 9Structuring programs – Constants, static, recursion, two-dimensional arrays and clean functions.
    Constants with #define · static: a value that stays · Recursion in C · Two-dimensional arrays · Boss: grade average with functions
  10. Chapter 10Enumerations and switch – Names for numbers with enum, case distinction with switch, typedef and a small machine.
    Names for numbers: enum · Case distinction: switch and break · Shorter type names: typedef · enum as an index · Boss: a drinks machine
  11. Chapter 11Sorting and searching – Bubble sort by hand, qsort with a comparison function, sorting structures and binary search.
    Sorting by hand: bubble sort · The library sorts: qsort · Sorting structures · Finding fast: binary search · Boss: a ranking
  12. Chapter 12Bits and bytes – Memory sizes with sizeof, numbers in hexadecimal, bitwise operators, shifting and bit flags.
    How big is that? sizeof · Numbers in hexadecimal · Bit by bit: & | ^ ~ · Shifting bits: << and >> · Boss: permissions as bit flags

Final project: C points coach

Combine variables, a decision and an output into your own points coach.

How it works

Every lesson starts with short explanation pages. Then you practise with multiple-choice questions, fill-in-the-gap tasks, putting code in order and writing your own code – with hints and instant feedback. Free, without ads, on phone, tablet and PC.

Learn C now