Learn to Code with C – free Raspberry Pi book
By Russell Barnes. Posted

Learn to Code with C is your guide to the world's most popular programming language
Advertisement
The desktop computer you've been waiting for: Raspberry Pi 500+
Programmers rejoice! A new MagPi Essentials book called Learn to Code with C has been released.
Learn to Code with C was written by The Raspberry Pi Foundation's very own Simon Long. The UX engineer responsible for much of Raspbian's greatness.
Written by someone who knows their stuff, Learn to Code with C is your guide to the world's most popular programming language. It's free and open source, so you should pick up a copy right now.
While C is a big step up from Python, we can't think of a better tour guide than this plain-speaking book.
Why you should learn C on a Raspberry Pi
Learning the C programming language will give you masterful control over a computer. "It can give you control over the smallest details of how a processor operates but is still simple to learn and read," says Simon. "This series is an introduction to programming in C for absolute beginners; you don’t need any previous programming experience, and a Raspberry Pi running Raspbian is all you need to get started."
Moreover, a working knowledge of coding is a must have tool for your digital toolbox. This imperative language is used to create everything from digital toasters up to massive commercial projects.
Most of Linux and the Raspbian operating system is coded in C. As a consequence, learning it gives you a real insight into how programming, and computers, work.
Inside Learn to Code with C
The MagPi Essentials: Learn to Code with C has thirteen chapters, covering every aspect of the language:
- Getting started: What’s so great about C?
- Variables & Arithmetic: Create variables and do maths
- Conditions & Comparisons: Control the flow of your C programs
- More Advanced Flow Control: For loops and case statements
- Pointers: Variables have addresses too
- Functions: Split your code into bite-sized chunks
- Arrays & Strings: Handle lists of values, and letters
- The String Library: Simplify common operations on strings
- User Input: Reading and interpreting user input
- File Input and Output: Learn to read from and write to files
- More about Types and Variables: Type definitions, enumerations & more
- Header Files and the Preprocessor: Splitting code up into multiple files
- Quick Reference: Cheat sheets and code examples

Russell runs Raspberry Pi Press, which includes The MagPi, Hello World, HackSpace magazine, and book projects. He’s a massive sci-fi bore.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles

Raspberry Pi 500+ in Raspberry Pi Official Magazine issue 158
We’re quite taken with Raspberry Pi 500+. But when you don’t need all that processing power, and just want a board that will make a plastic skeleton jump around in a terrifying manner, you’ll find Raspberry Pi Pico more than up to the job. There’s more terror in the magazine (which is only right as […]
Read more →

Win one of five Raspberry Pi SSD 1TB
Raspberry Pi prides itself on high quality hardware, and this 1TB Raspberry Pi SSD is no different. You can use it with a standard Raspberry Pi or even in your desktop PC – the choice is yours. We have five to give away and you can enter below Win 1 of 5 Raspberry Pi SSD […]
Read more →

Dual-screen cyberdeck
Twin screens mean you can code on one screen while watching David Bowie’s 1978 Musikladen show on the other.
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.