Arithmetic Operators

Syntax
z = x + y; x += y;     // equivalent to x = x + y

z = x - y; x -= y;     // equivalent to x = x - y

z = x * y; x *= y;     // equivalent to x = x * y

z = x / y; x /= y;     // equivalent to x = x / y

z = x % y; x %= y;     // equivalent to x = x % y

z = -x;

++x; x++;

--x; x--;

Addition
x = 10 + 7;      // On integers y = 1.23 + 3.45; // On floats p = p + 1;       // One pointer and one integer used as a byte offset

Subtraction
x = 10 - 7;                     // On integers y = 3.45 - 1.23;                // On floats pointer_c = pointer_a - offset; // Pointer and integer used as an offset offset = pointer_b - pointer_a; // Get offset (integer) between two pointers

Multiplication
x = 10 * 7; y = 3.45 * 1.23;

Memory pointers cannot be multiplied or divided.

Division
x = 10 / 7; y = 3.45 / 1.23;

Integer division of positive values truncates towards zero, so 10/7 is 1.

Memory pointers cannot be multiplied or divided.

Modular Division
x = 10 % 7;

Modular division returns the remainder produced after performing integer division, so 10%7 is 3.

Negation
z = -x;

Only provides a negative result if the operand, x, is of a signed data type.