#include<stdio.h>
#include<stdlib.h>
int main(){
unsigned short s[]={
0x4500,
0x0030,
0x2c72,
0x4000,
0x8006,
0x0000,
0xc0a8,
0x0002,
0x4a7d,
0xcc66};
unsigned long i,sum=0;
for(i= 0 ; i < sizeof(s)/sizeof(short) ; i++){
sum+=s[i];
}
while(sum>>16){
sum = (sum>>16)+(sum&0xffff);
}
printf("%p",~sum);
return 0;
}
来源:oschina
链接:https://my.oschina.net/u/3695598/blog/4283005