Q10. What are unary, binary and ternary operators? Classify the operators you have learnt so far into these three categories.
Ans. Unary Operators
Operators that act on one operand are referred to as Unary Operators.
Following are unary operators:
Logical Not !
Operators that act upon two operands are referred to as Binary Operators.
Following are binary operators:
Less than <
Less than or equal to <=
Equal to ==
Greater than >
Greater than or equal to >=
Not equal to !=
Logical OR ||
Logical AND &&
Operators that act upon three operands are referred to as Ternary Operators.
Following are ternary operators: