fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. char str[] = "Hi";
  6.  
  7. char * p = str;
  8. char c = '\0';
  9.  
  10. while ((c = *p++) != '\0')
  11. {
  12. for (int8_t i = 7; i >= 0; i--)
  13. {
  14. printf("%d", ((c >> i) & 1));
  15. }
  16. }
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 4400KB
stdin
Standard input is empty
stdout
0100100001101001