3 ms·
This is also exactly what the ANSI ("Second edition") K&R book I have in front of me says. It goes on to say: "x % y produces the remainder when x is divided b
by tialaramex 5y ago
This is also exactly what the ANSI ("Second edition") K&R book I have in front of me says.
It goes on to say: "x % y produces the remainder when x is divided by y" and that "the sign of the result for % are machine-dependent for negative operands, as is the action taken on overflow or underflow".