下面有网上朋友写的方法,我总结摘录如下: #include <stdio.h> int main() { int num1[8] = {0x1234,0x1234,0x1234,0x1234,0x1234,0x1234,0x1234,0x1234}; int num2[8] = {0x5678,0x5678,0x5678,0x5678,0x5678,0x5678,0x5678,0x5678}; int num3[8]; for(int i=0;i<8;i++){ num3[i] = num1[i]+num2[i]; printf("%x/t",num3[i]); } return 0; } #include <stdio.h> #include <string.h> void add(char *n1,char *n2,char *r) { char nn1[66]={0}; char nn2[66]={0}; char nn3[66]={0}; int len1,len2,i,off; int over=0,temp; len1=strlen(n1); len2=strlen(n2); if((len1>64)||(len2>64)) { memcpy(r,"数太长了,你傻B啊!",66); return; } for(i=len1,off=64;i>0;i--,off--) { nn1[off]=n1[i-1]-48; if((nn1[off]<0)||(nn1[off]>9)) { memcpy(r,"数据1里边夹有非法字母,你瞎啊!",66); return; } } for(i=len2,off=64;i>0;i--,off--) { nn2[off]=n2[i-1]-48; if((nn2[off]<0)||(nn2[off]>9)) { memcpy(r,"数据2里边夹有非法字母啊,脓包!",66); return; } } for(i=64;i>0;i--) { temp=nn1[i]+nn2[i]+over; nn3[i]=temp%10; over=temp/10; } nn3[0]=over; off=0; while(nn3[off]==0) off++; for(i=off;i<65;i++) r[i-off]=nn3[i]+48; } void main() { char *x="1212121212121212121212121212124212121212121912121212121212121212"; char *y="3333333333333333333333353333334333333333333933333333333388873738"; char c[66]={0}; //结果,考虑会最多会进一位,留1位结尾,共66位.但x和y最长64位 add(x,y,c); printf(" %s/n+/n %s/n=/n %s/n/n",x,y,c); } 有一个帖子方法很多: http://topic.csdn.net/u/20090223/20/4be4a80a-3e9b-461a-8528-cab2950fb336.html