Question: what is the difference between unary and binary and ternary operator?
Answer: Number of operands – There are three types of operators based on the number of operands. ... If an operator takes one operand, it called a unary operator; if it takes two operands, it called a binary operator; if it takes three operands, it called a ternary operator.