C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 41)
41.
Which of the following operators cannot be overloaded?
Discussion:
13 comments Page 1 of 2.
Swathi S said:
1 decade ago
Operators which cannot be overloaded
?: (conditional)
. (member selection)
.* (member selection with pointer-to-member)
:: (scope resolution)
sizeof (object size information)
typeid (object type information)
?: (conditional)
. (member selection)
.* (member selection with pointer-to-member)
:: (scope resolution)
sizeof (object size information)
typeid (object type information)
Surendra said:
1 decade ago
Ternary operators cannot be overloaded.
Ranjith Acharya said:
1 decade ago
What do you mean by overloading?
Andrei said:
1 decade ago
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.
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:
1 decade ago
Why it can't be overloaded?
Roopesh said:
1 decade ago
The process of making an operator to exhibit different behavior at different instances is known as operator overloading.
Conditional operator cannot be overloaded.
Conditional operator cannot be overloaded.
Sujatha said:
1 decade ago
What is sizeof operator?
Nilesh said:
1 decade ago
Which operators are overloaded?
Shailendra said:
10 years ago
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).
?: (conditional).
. (member selection).
.* (member selection with pointer-to-member).
:: (scope resolution).
sizeof (object size information).
typeid (object type information).
Sankar said:
8 years ago
Can anyone explain about this question?
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers