Source code

Here you can find source code you can use for some of the exercises in the book. You will need a normal UNIX computer such as one running FreeBSD, Linux, or MacOS X. Most of the code you will find here is portable, conforms strictly to the ISO C Standard, and should work on any validated C implementation but there will also be UNIX-specific code e.g. for processes and signals.

The assignments are listed in the order they are intended to be solved while learning C — but you can solve them in any order since they are independent (they don’t use code from other assignments).

File Assignment Purpose
rpn.zip RPN Calculator Getting started with C — no pointers needed
word.zip Longest word Introduction to dynamic memory allocation
poly.zip Polynomial multiplication Practice memory allocation
endian.zip Endianness Practice writing portable code

Leave a Reply

Your email address will not be published. Required fields are marked *