Professional Documents
Culture Documents
Starting Out with C++: From Control Structures through Objects, 9/e ©2018 Pearson Education
24. subscript
25. =
26. an address
27. address, or name
28. multi-dimensional
29. rows, columns
30. two
31. braces
32. column
33. Standard Template Library (or STL)
34. sequence and associative
35. sequence
36. vector
37. push_back
38. size
39. pop_back
40. clear
Starting Out with C++: From Control Structures through Objects, 9/e ©2018 Pearson Education
// An array to hold populations
long populations[SIZE];
46. No, the correct sum will not be printed for numberArray2 because the
accumulator (total) is not set back to zero before the second loop executes.
Starting Out with C++: From Control Structures through Objects, 9/e ©2018 Pearson Education
total = 0;
// Sum a column.
for (row = 0; row < NUM_ROWS; row++)
total += days[row][col];
// Display the column's total.
cout << "The total for column "
<< col << " is " << total << endl;
}
50. false
51. true
52. true
53. false
54. true
55. false
56. true
57. true
58. false
59. true
60. true
61. false
62. false
63. false
64. false
65. true
66. false
67. true
68. true
69. true
70. true
71. true
72. false
73. false
74. true
75. false
76. true
77. true
78. false
79. true
Starting Out with C++: From Control Structures through Objects, 9/e ©2018 Pearson Education
87. The assignment operator cannot be used to assign the contents of one array to
another, in a single statement.
88. The parameter should be declared as int nums[]. Also, the function should
have a parameter to hold the size of the array.
89. The parameter must specify the number of columns, not the number of rows.
90. You do not use an = operator before the initialization list.
Starting Out with C++: From Control Structures through Objects, 9/e ©2018 Pearson Education