6.5.5 Multiplicative operators

Previous Table of Contents

1133

multiplicative-expression:
                cast-expression
                multiplicative-expression * cast-expression
                multiplicative-expression / cast-expression
                multiplicative-expression % cast-expression 

1134 Each of the operands shall have arithmetic type.

1135 The operands of the % operator shall have integer type.

1136 The usual arithmetic conversions are performed on the operands.

1137 The result of the binary * operator is the product of the operands.

1138 The result of the / operator is the quotient from the division of the first operand by the second;

1139 the result of the % operator is the remainder.

1140 In both operations, if the value of the second operand is zero, the behavior is undefined.

1141 When integers are divided, the result of the / operator is the algebraic quotient with any fractional part discarded.88)

1142 If the quotient a/b is representable, the expression (a/b)*b + a%b shall equal a.

Next

Created at: 2005-06-29 02:18:59 The text from WG14/N1124 is copyright © ISO