Arithmatics and Assignment Operators
Arithmatics and Assignment Operators
area = PI * r * r;
Operator
Operator
Operator is special symbol used for some
operation
Categories of Operators
Based on number of operand there are
three kind of operator
❑Unary Operator
❑Binary Operator
❑Ternary Operator
Types of Operator
Arithmetic Operators +, -, *, / , %
Conditional Operator ? :
Arithmetic operators:
▪a = a + b can be written as a += b
▪a = a * b can be written as a *= b
▪a = a / b can be written as a /= b
▪a = a - b can be written as a -= b