Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose that you want to develop two different + operators that calculate and re

ID: 3538593 • Letter: S

Question

  1. Suppose that you want to develop two different + operators that calculate and return an object of some class. Which statement is correct?
    • A. One operator must be a friend and the other must not.
    • B. One operator must be public and the other private.
    • C. The operators must have a different parameter lists.
    • D. It is not possible to have two different + operators.
  2. What is printed by these statements?
        int i = 1;     int k = 2;     int *p1;     int *p2;     p1 = &i;     p2 = &k;     p1 = p2;     *p1 = 3;     *p2 = 4;     cout << i; 
    • A. 1
    • B. 2
    • C. 3
    • D. 4

Explanation / Answer

1.

The correct option is C.

Explanation:

2.

The correct option is A.

Explanation:

cout << i;

Hence, the printed value is 1.