Subj : Re: Reversing a number To : comp.programming From : zeroxia Date : Sat Sep 10 2005 10:45 pm Is this implementation not compiler-specific? (For example, the case of which i is negative. int reverse(int i) { int n = (i % 10); i /= 10; while (i) { n *= 10; n += i % 10; i /= 10; } return n; } .