Anonymous

What Is The Difference Between Unary Operator And Binary Operator In C++ Programming?

3

3 Answers

Anonymous Profile
Anonymous answered
Unray Operators:
A type of operators that works with one operand.
Following operators are unary operators:
-,++,--
The above operators are used with one operand as follows:
-a;
N++;
--x;

Binary operators:
A type of operator that works with two operands is know as binary operators.
+,-,*,/,% these are binary operators.
Florio Potter Profile
Florio Potter answered

Unary '-' : It is used with a single operand and that is why it is an unary operator.

Binary '-' : This operator functions upon two operands and returns the difference between the two by subtracting the value of second operand from the first. Both the operands may have float or integer types

For more information get help at CodeAvail- Online Computer Science Assignment help

Answer Question

Anonymous