next up previous contents index
Next: Relational Operators Up: Binary Operators Previous: Binary Operators

Arithmetic Operators

   

The arithmetic operators--Addition (+), Subtraction (-), Multiplication (*), Division (/) and Modulus (%)--accept arithmetic operands; the type of the resulting expression is the type of the larger of the two operands (See Section 3.6 for type conversion rules). Multiplication, Division, and Modulus have higher precedence than Addition and Subtraction.

  The Modulus operator can only be applied to integral operands. It returns the remainder of the left operand divided by the right operand. When applied to integral operands, the Division operator returns the quotient of the two operands.

    The Exponentiation operator (^) takes two operands, and evaluates the first operand raised to the power of the second operand. Exponentiation has the highest precedence of the binary arithmetic operators.



Kay Nettle
Fri Feb 21 21:14:29 CST 1997