C Programming Errata
Updates and Corrections
Last updated December 31, 2021
- Page 26
- The command to compile at the command prompt specifies the
-c
switch. This switch isn't necessary to build a program and you can omit it. The-c
switch directs the compiler to compile only; the object code isn't linked to create a program. While the-c
switch has its purposes, it's unnecessary to type at the command prompt when building the programs listed in the book. - Page 61
- In the sample code (center of the page), it should read
is a float
notis an float
. - Page 72
- At the top of the page, character value
'a'
is placed into char variablec
. The code does not use a variablea
. - Page 85
- In the paragraph below Exercise 7-2, the first sentence refers to Exercise 7-2, not Exercise 7-1.
- Page 117
- In the paragraph starting "exit_condition", the statements continue to loop until the exit condition is false. In other words, the statements repeat while the exit condition is true. I apologize for the confusion.
- Page 291
- In Listing 19-4, the production team left some tags in the code that don't belong:
<SPiSymbol>
. Please ignore these tags. Listing 19-4 appears cleanly here on the web. - Page 357
- For Exercise 22-17, the reference to an earlier Exercise should read 20-13, not 20-12.
- Page 418
- The final bullet on the page is incorrect. You can specify any character code value using the format
\0nn
or\nn
wherenn
is an octal value. (Octal values aren't listed in Appendix A; click here for a list.) Octal values are prefixed by a zero in C, though this prefix isn't necessary with the backslash escape character. Also,\33
, is the code for Escape (decimal 27, hex 0x1b), not the exclamation point. At one time, some compilers did allow for the\nn
prefix for ASCII code values in decimal. This anomaly is no longer the case.
Copyright © 1997-2024 by QPBC.
All rights reserved