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
Explain what are accessor methods?
Define what is constructor?
What is the latest version on c++?
What are the data types in c++?
What is function declaration in c++ with example?
Tell me difference between constant pointer and pointer to a constant.
Is dev c++ free?
What is scope in c++ with example?
How many static variables are created if you put one static member into a template class definition?
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h
What is the difference between c++ and turbo c++?
What is the outcome of cout< a) 16 b) 17 c) 16.5
What is a vector c++?
What is the return value of the insertion operator?
What is the difference between reference and pointer?