0

What is the difference between unary operator and binary operator?

+

1st Mar 2017, 2:15 AM
meet
meet - avatar
4 Réponses
+ 8
Unary operators have one operand/value that they work with. Ex: x++ (operand is x) Binary operators need two operands. Ex: y * 7 (operands are y and 7).
1st Mar 2017, 3:17 AM
Tamra
Tamra - avatar
+ 8
Ternary needs 3 operands. Condition ? action if true : action if false The condition and two actions are the operands, and ?: is the operator.
1st Mar 2017, 5:32 AM
Tamra
Tamra - avatar
0
ternary operator??pls ans
1st Mar 2017, 4:29 AM
Meharban Singh
Meharban Singh - avatar
0
thanks
1st Mar 2017, 5:44 AM
Meharban Singh
Meharban Singh - avatar