Which of the following statements will not produce a syntax error?
a. Defining a const member function that modifies a data member of the object.
b. Invoking a non-const member function on a const object.
c. Declaring an object to be const.
d. Declaring a constructor to be const.
c. Declaring an object to be const.
You might also like to view...
If a mathematical formula refers to a cell that contains a text value rather than a number, you will get a(n) ________ error
A) #REF! B) #NULL! C) #VALUE! D) #N/A
Which set of statements totals the values in two-dimensional int array items?
a. int total = 0; for (int subItems : items) for (int item : subItems) total += item; b. int total = 0; for (int item: int[] subItems : items) total += item; c. int total = 0; for (int[] subItems : items) for (int item : items) total += item; d. int total = 0; for (int[] subItems : items) for (int item : subItems) total += item;