Redirected
recategorized
2,011 views

3 Answers

Best answer
2 votes
2 votes

ans is option 4

 

Operators which cannot be overloaded[edit]

selected by
0 votes
0 votes

Most can be overloaded. The only C operators that can’t be are . and ?: (and sizeof, which is technically an operator). C++ adds a few of its own operators, most of which can be overloaded except :: and .*.

There is no fundamental reason to disallow the overloading of ?:. So far the committee just hasn’t seen the need to introduce the special case of overloading a ternary operator. Note that a function overloading would not be able to guarantee that only one of expr2 and expr3 was executed.

sizeof cannot be overloaded because built-in operations, such as incrementing a pointer into an array implicitly depends on it.

&,*,«,» can be overload so correct answer is 

Answer: D

Answer:

Related questions

0 votes
0 votes
3 answers
1
go_editor asked Mar 24, 2020
2,355 views
Which of the following cannot be passed to a function in C++?ConstantStructureArrayHeader file