72.6k views
5 votes
Overloading an operator does not change what 4 things?

a) Operator's precedence
b) Operator's associativity
c) Operator's arity
d) Operator's functionality

1 Answer

0 votes

Final answer:

When overloading an operator, it does not change the operator's precedence, associativity, arity, or functionality.

Step-by-step explanation:

When overloading an operator, four things are not changed:

  1. Operator's precedence: Precedence determines the order of execution of operators. Overloading an operator does not change its precedence.
  2. Operator's associativity: Associativity determines the order in which operators of the same precedence are evaluated. Overloading an operator does not change its associativity.
  3. Operator's arity: Arity refers to the number of operands an operator takes. Overloading an operator does not change its arity.
  4. Operator's functionality: Overloading an operator does not change its functionality. It only changes how the operator behaves when applied to user-defined types.

User Florian Lagg
by
8.0k points