White Space

This appendix is a compact description of the extended subset of C used for the examples in this book. It is not a complete description of C, much less of C++, which is an extended (some might say overextended) version of C for object-oriented programming. The C++ features (class, public, private) are used only in Part B. For complete descriptions and more explanation than we have room for here, see the Additional Reading. A comment in C is introduced by the characters /* and terminated by */. In C++ (and in many implementations of C), a comment may also be introduced by the characters //, and this kind of comment is terminated by the next end-of-line. Comments do not occur within strings or character literals. Blanks, tabs, new-lines, form-feeds, and comments are known as white space. Before a compiler translates source code to executable code, a preprocessor performs macro expansion and file inclusion, under the control of lines beginning with a # character (possibly after some white space), as follows. A control line of the form # define I X where I is an identifier (Section A.1.5) and X is arbitrary text, causes the pre-processor to replace subsequent occurrences of the identifier with X. Leading and terminating white space are stripped from X.