The multiplication-expression

Coverity Documentation

Version
latest

A multiplication-expression multiplies ( * ) or divides ( / ) two integer values.

Syntax


Syntax diagram, multiplication-expression
multiplication-expression ::=
    expression ( '*' | '/' ) expression

Each operand must evaluate to an integer value.

Either operand can be a complex subexpression, as well as an integer variable or an integer literal.

If the divisor does not evenly divide the dividend, the result is a truncated value: The remainder is discarded.

Dividing by zero causes a run-time error.

As in algebraic notation and nearly all programming languages, in an expression multiplication has precedence over division, and a unary operation has precedence over multiplication.