Question.1
A developer tries to overload the following operators:
class Reg { public: void operator.(Reg& r); // dot void operator::(int n); // scope resolution void operator?:(int a, int b); // ternary };
Will any of these compile?
Select Answer
All three compile -- any operator can be overloaded
None -- dot (.), scope resolution (::), ternary (?:), and sizeof cannot be overloaded in C++
Only dot (.) can be overloaded
Only :: can be overloaded