Exercises for Experience
The best way to really get to know the required material
for this class is by using it. Not just doing pencil and paper
exercises, but designing and writing programs, putting them
in the computer, and making them work.
The ugly pink/purple book contains a lot of exercises, most of which
are just what is needed for this kind of practice. Each chapter
has 40 to 60 exercises at the back; they start with really easy
ones that don't require real programming, and work up towards
big ones that would make major homework assignments.
I recommend picking whatever chapter(s) cover the subject(s) that
you are not 100% confident with, and starting to work through
the exercises. To start with, they won't take long, but once you
get to the time-consuming ones, don't force yourself to do them
all in order. Pick a few to do really properly. If you can write
correct programs, you can almost certainly correctly answer
exam questions about programming.
These are my recommendations:
- Chapter 3, about Functions,
- ex 3.2 (p224) up to ex 3.60 (p238)
- Chapter 4, about Arrays,
- ex 4.2 (p291) up to ex 4.38 (p303)
- Chapter 5, about Pointers,
- ex 5.4 to 5.7 (p366)
- and ex 5.9 to 5.17 (p369)
- and ex 5.25 to 5.48 (p380)
- NOTE: when they tell you to use
a particular function (e.g. strcmp,
strtok, etc) for string operations, ignore them, and do
it whatever way is best for you.
- Chapter 6, about Objects,
- ex 6.2 (p448)
- and ex 6.5 to 6.15 (p449)
- For the Future, Chapter 16, about new, delete, and linked lists,
- Starting from ex 15.6, (p829)
If you become confident with these exercises, you will
be well prepared for the examinations.
It would be a good idea to look at a random selection of the exercises
even for the chapters you are confident with, just to make sure
there is nothing you've missed out on.