Practical C Programming, 3rd edition by Steve Oualline Here are the changes that were made for the 11/98 reprint: {58} code example 3, line 3: "main()" changed to "int main()" {76} code sample #include signed char ver_short; /* A very short integer */ int temp; /* A temporary number */ int main() { fgets(line, sizeof(line), stdin); sscanf("%d", &temp); very_short = temp; } changed to #include signed char ver_short; /* A very short integer */ char line[100]; int temp; /* A temporary number */ int main() { fgets(line, sizeof(line), stdin); sscanf(line, "%d", &temp); very_short = temp; } {128} both figures use the wrong delimiters for comments. /comment/ changed to /* comment */ To view the corrected figures, return to the main errata pages and click on the links for Figure 9-1 and Figure 9-2. (159) line -2, "Question: Why does test #3 fail to print Both are not zero #3?": "#3" was removed. {163} Table 11-7: the number 2 mistakenly appears in the rows "Binary Value >> 2", "Result", and "Final Result (Binary)". The table now appears as follows: signed char signed chared unsigned char Expression 9 >> 2 -8 >> 2 248 >> 2 Binary Value >> 2 0000 1010 >> 2 1111 1000 >> 2 1111 1000 >> 2 Result ??00 0010 ??11 1110 ??11 1110 Fill Sign Bit (0) Sign Bit (1) Zero Final Result (Binary) 0000 0010 1111 1110 0011 1110 Final Result (short int) 2 -2 62 {165} Table 11-11: columns "Base 2 Equivalent" and "Result (Base 2)" should not have number "2". The binary numbers were corrected by removing the 2s. C Representation Base 2 Equivalent Result (Base 2) Bit Number 1<<0 00000001 << 0 00000001 Bit 0 1<<1 00000001 << 1 00000010 Bit 1 1<<2 00000001 << 2 00000100 Bit 2 1<<3 00000001 << 3 00001000 Bit 3 1<<4 00000001 << 4 00010000 Bit 4 1<<5 00000001 << 5 00100000 Bit 5 1<<6 00000001 << 6 01000000 Bit 6 1<<7 00000001 << 7 10000000 Bit 7 (185) code sample 1, line 1: "Delcare" changed to "Declare" (195) para. 1, line 4: "in programmer's using" changed to "in programmers using" <266> blank space under line 1 ("where:") now shows the plus or minus symbol (266) in the line, "The IEEE has defined a floating-point standard (#742)..." "742" changed to "754" (348) "In this chapter" box: bullet item 3 "37 (0 {2" changed to "Code Design"