CodePudding user response:
#include#include
Int main ()
{
Char STR [33].
The scanf (" % s ", STR);
The union Value {
Int v.
Unsigned char c [4];
} the value;
Int j=0;
Value. V=0;
For (; j<32. J++) {
Value. V<=1;
If (STR [j]=='1')
Value. V |=1;
}
Printf (" % d, % d, % d, % d \ n ", value, c [3], the value. The c [2], the value. The c [1], the value. The c [0]).
return 0;
}
CodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.htmlI hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html