What about negative numbers? Before C99 settled on the "truncate toward zero" rule for integer division, there were a couple of possibilities. But with the rule in place, you get a negative modulus value if the first operand is negative, and you get a positive modulus otherwise:
11 / 5 is 2, and 11 % 5 is 1
11 / -5 is -2, and 11 % -2 is 1
-11 / -5 is 2, and -11 % -5 is -1
-11 / 5 is -2, and -11 % 5 is -1
If your system shows different behavior, it hasn't caught up to the C99 standard. In any case, the standard says, in effect, that if a and b are integer values, you can calculate a%b by subtracting (a/b)*b from a. For example, you can evaluate -11%5 this way:
-11 - (-11/5) * 5 = -11 -(-2)*5 = -11 -(-10) = -1