Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int binary[8];
- char array;
- for (i=0;i<8;i++)
- if(binary[i])
- "Here I want put 1 in the position bit of the variable array"
- else
- "Here I want put 0 in the position bit of the variable array"
- int binary[8];
- char array = 0;
- int n = 8;
- while (n) {
- array |= binary[--n];
- array <<= 1;
- }
- for (int i = 0; i < 8; i++)
- array |= binary[i] << i;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement