An operator is a symbol which perform an operation
An operator is said to be unary, if it performs operation
on single operand.
Ex:
int a = 10;
a++;
An operator is said to be binary, if it performs
operation on two operands
Ex:
int a=10,
b=20;
int c = a-b;
An Operator is said to be ternary if it perform operation
on three operands
Ex:
int a = 10,
b=20, c;
c= (a>b) ?
a : b;
Operators in processing are divided into 5 major
categories.
Arithmetic
Conditional
Logical
Bitwise
Miscellaneous
No comments:
Post a Comment