printf("请输入你需要解析的IP地址:");
scanf("%lx",&input_IP);
BeginByte = (input_IP >> 24) & ~(~0 << 8);//获取IP地址最高位
MidByte = (input_IP >> 16) & ~(~0 << 8);//获取第二段
ThirdByte = (input_IP >> 8 ) & ~(~0 << 8);//获取第三段
EndByte = input_IP & ~(~0 << 8);//获取第四段
printf("The IP address after parsed is: %d.%d.%d.%d\n",BeginByte,MidByte,ThirdByte,EndByte);
/*两个循环移位函数*/
printf("%u after rotated twice is =%u\n",int_rotate,_rotl(int_rotate,2));
printf("%u after rotated once is =%u\n",int_rotate,_rotr(int_rotate,1));
_rotl _rotr利用左移和右移函数,输出,可以确保信息不丢失