1// Note that u can change this function to print int values
2// by changing the type and the sizeof
3void print_bin(unsigned char value)
4{
5 for (int i = sizeof(char) * 7; i >= 0; i--)
6 printf("%d", (value & (1 << i)) >> i );
7 putc('\n', stdout);
8}
1// Note that u can change this function to print int values
2// by changing the type and the sizeof
3void print_bin(unsigned char value)
4{
5 for (int i = sizeof(char) * 8; i != -1; i--)
6 printf("%d", (value & (1 << i)) >> i );
7 putc('\n', stdout);
8}