Difference between Operator overloading and Functional
overloading?
Answer Posted / nsit@salem
C++ provides more than 35 operators, covering basic
arithmetic, bit manipulation, indirection, comparisons,
logical operations and others. Almost all operators can be
overloaded for user-defined types, with a few notable
exceptions such as member access (. and .*) as well as the
conditional operator. The rich set of overloadable operators
is central to using C++ as a domain-specific language. The
overloadable operators are also an essential part of many
advanced C++ programming techniques, such as smart pointers.
Overloading an operator does not change the precedence of
calculations involving the operator, nor does it change the
number of operands that the operator uses (any operand may
however be ignored by the operator, though it will be
evaluated prior to execution). Overloaded "&&" and "||"
operators lose their short-circuit evaluation property.
Operators that cannot be overloaded
Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
write a function signature with various number of parameters.
If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?
What is static in c++?
Explain terminate() function?
What is meant by entry controlled loop? What all C++ loops are exit controlled?
Where do I find the current c or c++ standard documents?
Why was c++ created?
What is an overflow error?
What is the difference between public, private, and protected access?
What gives the current position of the put pointer?
an operation between an integer and real always yeilds a) integer result b) real result c) float result
What is difference between array and vector in c++?
What is the main purpose of c++?
What is an orthogonal base class in c++?
What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0