C++ Programming - OOPS Concepts - Discussion

Discussion :: OOPS Concepts - General Questions (Q.No.41)

41. 

Which of the following operators cannot be overloaded?

[A]. []
[B]. ->
[C]. ?:
[D]. *

Answer: Option C

Explanation:

No answer description available for this question.

Swathi S said: (Aug 29, 2012)  
Operators which cannot be overloaded
?: (conditional)
. (member selection)
.* (member selection with pointer-to-member)
:: (scope resolution)
sizeof (object size information)
typeid (object type information)

Surendra said: (Apr 28, 2013)  
Ternary operators cannot be overloaded.

Ranjith Acharya said: (Jan 3, 2014)  
What do you mean by overloading?

Andrei said: (Feb 8, 2014)  
Overloading operators refers to adding functionality to an operator, similar to overloading function or constructor.

For example you can tell the "+" operator how to add adrian.points=alex.points+chriss.points....And by the way, .* cannot be overloaded, but * can. suppose you want to multiply the points in the object from last example as adrian.points=alex.points*chriss.points.

Gaurav said: (Aug 22, 2014)  
Why it can't be overloaded?

Roopesh said: (Nov 14, 2014)  
The process of making an operator to exhibit different behavior at different instances is known as operator overloading.

Conditional operator cannot be overloaded.

Sujatha said: (Jan 19, 2015)  
What is sizeof operator?

Nilesh said: (Mar 18, 2015)  
Which operators are overloaded?

Shailendra said: (Nov 17, 2015)  
Except of this operator all operator can be overload.

?: (conditional).
. (member selection).
.* (member selection with pointer-to-member).
:: (scope resolution).

sizeof (object size information).
typeid (object type information).

Sankar said: (Aug 10, 2017)  
Can anyone explain about this question?

Prashant Giri said: (Sep 5, 2017)  
-> pointer member selection operator also can not overloaded.

Vani said: (Jun 13, 2019)  
?: (conditional).
. (member selection).
.* (member selection with pointer-to-member).
:: (scope resolution).

sizeof (object size information).
typeid (object type information).

So, it can't be overloaded.

Md Hayatuddin said: (Feb 21, 2021)  
Can we overload -> operator?

Because it is similar to. (dot) operator.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.