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
Differentiate between a constructor and a method in C++.
How would you find out if a linked-list is a cycle or not?
Is c++ double?
Difference between class and structure.
What is function overloading c++?
Which is the best c++ compiler for beginners?
How do I write a c++ program?
How can we read/write Structures from/to data files?
Can we sort map in c++?
Describe friend function & its advantages.
Distinguish between new and malloc and delete and free().
What is function prototyping?
How do you sort a sort function in c++ to sort in descending order?
What is vectorial capacity?
What is function overloading in C++?