Self-Review Exercises

  1. 10.1 Fill in the blanks in each of the following:

    1. Suppose a and b are integer variables and we form the sum a + b. Now suppose c and d are floating-point variables and we form the sum c + d. The two + operators here are clearly being used for different purposes. This is an example of              .

    2. Keyword               introduces an overloaded-operator function definition.

    3. To use operators on class objects, they must be overloaded, with the exception of operators              ,               and              .

    4. The              ,               and               of an operator cannot be changed by overloading the operator.

    5. The operators that cannot be overloaded are              ,              ,               and

Get C++ How to Program, 10/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.