Which is the correct statement about operator overloading?

Huyền Thu

New member
Which is the correct statement about operator overloading?
A. Only arithmetic operators can be overloaded
B. Only non-arithmetic operators can be overloaded
C. Precedence of operators are changed after overlaoding
D. Associativity and precedence of operators does not change
 
Answer: d
Explanation: Both arithmetic and non-arithmetic operators can be overloaded. The precedence and associativity of operators remains the same after and before operator overloading.
 

Tìm kiếm

Back
Top