[说明2]
在C函数2中,reverse(unsigned int n)的功能是求出并返回n的反序数。例如,1234的反序数是4321,其求解过程如下:
(1)由1234除以10得到商123和余数4,0乘以10再加上4得到4;
(2)由123除以10得到商12和余数3,4乘以10再加上3得到43;
(3)由12除以10得到商1和余数2,43乘以10再加上2得到432;
(4)由1除以10得到商0和余数1,432乘以10再加上1得到4321。
[C函数2]
unsigned int reverse(unsigned int n)
{
unsigned int result=0;
while( (1) ){
result=result *10+n%10;
n= (2) ;
}
return result;
}
用567,1234,56781234,62354879643分别作为实参调用函数reverse,对应的返回值分别为765,4321,43218765,1357400630。请说明以62354879643作为实参调用函数reverse时返回结果出错的原因。