EGR 2261 banner

Suspected Typos in D. S. Malik's C++ Programming from Problem Analysis to Program Design (7th edition)


p. 143, fifth line from the bottom: "fail statement" should be "fail state."

p. 147, second line: "standard input device" should be "standard output device."

p. 213, fourth line from the bottom: "Example 4–12" should be "Example 4–8."

p. 221, fourth line from the bottom: "This type of statement" should be "This type of expression."

p. 242, Quick Review item 1: "the normal flow of control" should be "the normal flow of execution."

p. 290, second line: "Lines 14 and 15 declares" should be "Lines 14 and 15 declare."

p. 302, second-from-last line of the code listing in Example 5–16: Delete the listing's last statement, which is counter++;.

p. 322, first line of section named "Debugging Loops": "how careful" should be "how carefully."

p. 379, code listing in Example 6–10: In all three "else if" lines, "grade >=" should be "average >=".

p. 437, second line: "two decimal places" should be "four decimal places."

p. 462, fifth line of Programming Exercise 27: "of maximum length" should be "of maximum volume."

p. 495, Table 7-1: In the descriptions of strVar.length() and strVar.size(), "characters strVar" should be "characters in strVar."

p. 530, first line of section named "Array Initialization durng Declaration": "Like any other simple" should be "Like any simple."

p. 531, sixth line before the section named "Some Restrictions on Array Processing": "that follow the last" should be "that follow the first."

p. 535, fourth-from-last line of the code listing in Example 8–6: "list2[index] = list1[tar]" should be "list2[tar] = list1[index]."

p. 549, second line before section named "Auto Declaration and Range-Based For Loops": "The next section" should be "Chapter 16."

p. 564, third line from the bottom: "in three ways" should be "in four ways."

p. 568, second line of the section named "Largest Element in Each Row and Each Column": Delete "and finding the sum of both diagonals."

p. 593, third line: "temp[5]" should be "temp[3]."

p. 617, seventh line from the bottom: both instances of "newStudent" should be "student."

p. 651, second line of the first bulleted item: "Also, in the definition of the class" should be "Also, prior to the C++11 standard, in the definition of the class."

p. 654, Figure 10–1: in the last section of the UML diagram, the return type for incrementSeconds(), incrementMinutes(), and incrementHours() should be void instead of int.

p. 675, twelfth line: "clockType clockType(int = 0" should be "clockType(int = 0".

p. 694, Figure 10–11: in the last section of the UML diagram, "+print(): void" should be "+print() const: void."

p. 695, fourth line of Example 10–11: "split the number in the block" should be "split the number into blocks."

p. 762, second-from-last line of the paragraph after Figure 11–6: "from the class iostream" should be "from the classes istream and ostream."

p. 771, Figure 11–8: in the last section of the UML diagram, insert a + symbol in front of each of the following: setPersonalInfo, printPersonalInfo, and personalInfo.

p. 772, sixth line from the bottom: "The first 11 chapters" should be "The first 9 chapters."

p. 773, last line: "version used decided" should be "version used is decided."

p. 822, first line: "member function is" should be "member functions is."

p. 833, seventh line: "the data into the array" should be "the data in the array."

p. 836, third line from the bottom: "create dynamic dimensional" should be "create dynamic two-dimensional."

p. 841, sixth line from the bottom: "In the previous section" should be "In a previous section."

p. 862, comment after declaration of setID function (twelfth line on the page): "to set the salary" should be "to set the ID."

p. 865, comment after declaration of setPayRate function and comment after declaration of getPayRate function: in both comments, "the salary" should be "the pay rate."

p. 865, comment after declaration of setHoursWorked function and comment after declaration of getHoursWorked function: in both comments, "the bonus" should be "the hours worked."

p. 1295, list of reserved words: In the first column, "clase" should be "class." Also, in the second column, "include" should be deleted from the list, as it is not a reserved word.

p. 1297, table of operators: In the Associativity column, all entries before and including the reinterpret_cast row should be "Left to right." (So five entries should be changed from "Right to left" to "Left to right.") Also, in the the Operator column, delete –– from the row that starts with ->*, since both forms of the –– operator were already correctly listed in earlier rows.

p. 1324, eighth line of the first paragraph: "The header files—such as" should be "Other header files—such as."

p. 1385, answer to Exercise 15: "w = 117.3" should be "w = 117.5"

p. 1396, answer to Exercise 33: both instances of "30" should be "−100."

p. 1402, answer to Exercise 11, part a: "28" should be "27."