Electrical and Computer Engineering
4 of 48
UAH
CPE 112
Arithmetic Operators
• + Unary plus (one operand)
–- Unary minus (one operand)
–+ Addition (two operands)
–- Subtraction (two operands)
–* Multiplication (two operands)
–/     Floating-point division (floating-point result)
•Integer division (no fractional part)
–% Modulus (remainder from integer division) (two operands)
– 6/2 = 3 7/2 = 3
– 6 % 2 = 0 7 %2 = 1