Practical C Programming, 3rd edition by Steve Oualline Following are the changes made in the 4/00 reprint: (59) Question 4-2: "Why is the result of Example 4-4 "0"?" now reads "Why is the result of Example 4-4 "0.0"?" {151} Example 10-10: for (counter = 0.0 now reads for (counter = 1.0 {169} 1st paragraph: "2" is now subscripted (2 instances) {172} 2nd & 3rd paragraphs: "2" is now subscripted (4 instances) {182} Added the following sentence before "Summary": "The state field is two elements because it is designed to hold two characters. The field is not a string because we have not allocated enough space for the end of string character ('\0')." {192} Example 13-3, 3rd line: char array[ARRAY_SIZE] = "0123456789"; now reads char array[ARRAY_SIZE + 1] = "0123456789"; {196} ...from the source (p) to the destination (q). now reads ...from the source (q) to the destination (p). {241} Example 15-6 has been changed to read: 1 #include 2 char line[100]; /* line of input */ 3 int seven_count; /* number of sevens in the data */ 4 int data[5]; /* the data to count 3 and 7 in */ 5 int three_count; /* the number of threes in the data */ 6 int index; /* index into the data */ 7 8 int main() { 9 10 seven_count = 0; 11 three_count = 0; 12 get_data(data); 13 14 for (index = 1; index <= 5; ++index) { 15 16 if (data[index] == 3) 17 ++three_count; 18 19 if (data[index] == 7) 20 ++seven_count; 21 } 22 23 printf("Threes %d Sevens %d\n", 24 three_count, seven_count); 25 return (0); 26 } 27 28 void get_data(int data) 29 { 30 31 printf("Enter 5 numbers\n"); 32 fgets(line, sizeof(line), stdin); 33 sscanf(line, "%d %d %d %d %d", 34 &data[1], &data[2], &data[3], 35 &data[4], &data[5]); 36 } {292} Figure 17-9, top: new_ptr->next_ptr now reads new_ptr->previous_ptr