Learn to program with the world’s most popular language using your Raspberry Pi
The C programming language been used to program everything from the tiny microcontrollers used in watches and toasters up to huge software systems – most of Linux (and Raspbian itself) is written in it. Learn to code with C on your Raspberry Pi across 13 packed chapters:
Apologies for the following errata in Learn to Code with C. If you spot any errors in our books or magazines please email us via email@example.com. This list also appears on the Raspberry Pi forum.
On page 28, the code block contains the line int a = 5;
This should be:
int a = 0;
On page 61 of the book, the use of the * as an argument to the program is mangled by the shell on Unix (although it does work correctly on Windows). To fix this for Unix, replace the line:
if (*argv == '*') printf ("%d\n", arg1 * arg2);
if (*argv == 'x') printf ("%d\n", arg1 * arg2);
and use ‘x’ rather than ‘*’ for multiplication.
On page 64, the code block contains the line for (value = 30; value < 40; value++)
This should be
for (value = 48; value < 58; value++)
In the paragraph following this code block, the description “writing the bytes 30, 3…39“” should be “writing the bytes 48, 49…57“.
Learn to Code with C is freely licensed under Creative Commons (BY-SA-NC 3.0).
You can download this eBook free now and forever, but buying in print or digital supports the Raspberry Pi Foundation’s charitable mission.