fork download
  1. #include <errno.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <stdlib.h>
  5. #include <dirent.h>
  6.  
  7. void printbits(char x)
  8. {
  9. for(int i=sizeof(x)<<3; i; i--)
  10. putchar('0'+((x>>(i-1))&1));
  11. }
  12.  
  13. int main()
  14. {
  15. printbits(0b00110100 >> 3);
  16. }
  17.  
  18.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
00000110