[ create a new paste ] login | about

Link: http://codepad.org/NXKS7rd6    [ raw code | output | fork ]

C++, pasted on Jul 14:
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
int main(void)
{
 int i = 8, k;
 int byte = 0xc7;

 while (i-->0)
    k = (byte >> i) & 1,
    printf("%c", '0' + k);
 printf("\n");
 return 0;
}


Output:
1
11000111


Create a new paste based on this one


Comments: