Yes. you can be sure of this in C ++
ISO / IEC N3485 (working draft) says in 5.6.4
The binary / operator yields the quotient, and the binary % operator yields
the remainder from the division of the first expression by the second.
If the second operand of / or % is zero the behavior is undefined.
For integral operands the / operator yields the algebraic quotient with any
fractional part discarded;81 if the quotient a/b is representable in the type
of the result, (a/b)*b + a%b is equal to a; otherwise, the behavior of both
a/b and a%b is undefined.
source
share