Preface to the Second Edition
In the Preface to the First Edition, I stated that "you will find a particular way to make C work for you." I must admit that I myself was a victim of this trap. It turns out that because I had learned C before 1990, I was not as familiar with important C99 features as I should have been. I was guilty of thinking with my older C version habits. This outdated thinking was reflected largely in the chapter on enumerations and especially in the chapter introducing arrays, where Variable-Length Arrays (VLAs) – a major feature of C99 – were poorly covered. Both of these chapters have been completely rewritten to accurately represent the C standard.
I especially want to thank readers who pointed out the various text and source code typos. I understand how frustrating it can be when the code you use from the book just won't work. For this reason, extra attention has been given to the source code in the book and the example programs in the repository.
This edition corrects those typographical errors both in the text and in the sample code. It also corrects some conceptual errors that were either poorly described or just plain wrong. I offer my sincerest apologies to the readers of that edition. Any errors that remain are purely my responsibility.
This edition, as much as possible, provides some hints as to what is to come in the next version of the C standard – C23. These are added refinements that do not change the core of C but extend the clarity and usefulness of C.
Another addition to this version is the questions at the end of each chapter to reinforce the key concepts of that chapter. These should prove to be especially useful to programming beginners.
Finally, Chapter 27 has been added, which implements two complete yet simple card games. These demonstrate how to use pre-built structures and functions as well as how to employ a library, in this case. our own linked list library, for added functionality.