This is a self contained introduction to the C programming language. It is intended for students with some programming experience, but assumes very little.
It is also the first part of a course on C++, the remainder of which is available online.
The material is copyright Rob Pooley, but is made available free for personal use, but anyone intending to use it for commercial purposes should first contact the author for terms for its use.
Any hyperlinks to this material should start here or at the enclosing level of the C++ course.
The idea is to work through the notes and exercises by following links from one to the next. For those who want to go straight to a topic instead, a contents page is also provided below.
Note that in the examples the occurence of a less than sign (or opening angle bracket) has had to be replaced with the corresponding HTML character symbol. If you copy a program from the notes you will find it usually does not compile because of this. You would need to edit it to replace the HTML sequence with the less than character. To help avoid this, all examples are also provided as simple text files, which should compile and run unchanged.
Normally, new students start here.
Each page in the notes has an associated question page and, usually, a page with answers. You can use these to re-inforce the material in the notes.
Some of the exercises are intended to be milestones, by which you can judge your understanding. These are linked to the relevant page, but also appear directly in the index below, printed in red if you have a colour capable browser. These should be completed before you decide to move on.