Difference between unary operator overloading and binary operator overloading
Answers
Answered by
5
In unary operator overloading only the argument type can be changed but in binary operator overloading the argument type and order can be changed .
Answered by
13
Answer:
Unrary operator overloading :
1 ) operating overloading function works on the single value .
2 ) number of the object passed to the function is one only.
3 ) It is simple to use.
4 ) example : - ( minus operator )
Binary operator overloading :
1 ) Overloading binary operator works on two values.
2 ) number of objects passed to the operator function are two.
3 ) It is little difficult.
4 ) example : < ( less than operator )
Similar questions
Physics,
9 months ago
Social Sciences,
9 months ago
Science,
9 months ago
Biology,
1 year ago
English,
1 year ago