I got this question wrong on a midterm in my Computer Science class and am trying to find the correct answer, but I've been searching for a while and haven't turned up anything that conclusively states the answer. These are the options the teacher gave:
A) ==
B) .
C) =
D) b and c above
E) a, b, and c above
The answer I marked (incorrectly) is B, and I know the correct answer must include B as this operator is always used with classes without any overloading. However, one of the other options must also be correct, but I don't know if it's only one or both of them. I know =
will give a shallow copy, so I'm assuming that is included in the answer. But does ==
do anything at all if not overloaded?
All in all, I'm guessing the correct answer is D, but I'd like someone to back up this claim, and hopefully point me in the direction of some documentation online about this as I can't seem to find it.