digit = value % 10;
value /= 10;
whereas if you were writing it in ASM, both results would be
available to you in the same operation
Not necessarily; not all machines have a divide instruction that
produces both quotient and reminader. (Indeed, some don't have a
divide instruction at all - or are those the ones you were thinking
of?)
On those that do have a divide that produces both quo & rem, a good
compiler will notice that you have both a/b and a%b in close proximity
and collapse them. (Not all compilers are "good", of course.)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse at rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B