what operators work with single operator
Answers
Answer:
Unary operators need only one operand to perform the task or operation. The ++ & -- operators are called increament & decreament operators respectively. Binary operators required two operands to perform the operationBinary operators required two operands to perform the operation.
e.g +, -, *, /, % etc
Here these + & - operators will not indicate the sign of operand but add or substract two operands, because these are binary operators(e.g 3+5, 3–5)
Ternary operators
Ternary operators required three operands to perform the operation.
e.g ? & :
These are also called conditional operators.
Syntax is as
condition?expression1:expression2;
If condition is true expression1 will be executed otherwise expression2 will be executed. (e.g 3>2?T:F).
Explanation: