"Gabriel Genellina" <gagsl-py2 at yahoo.com.ar> writes: > > If you use %u you get a very large positive value, not +3. > Exactly, and that's the right value. (unsigned int)(-3) isn't +3. The OP specified that the expected result was 3.