Advertisement
metalx1000

Convert Text String to Binary

Dec 8th, 2012
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(){
  5.         int i;
  6.         char *word = "Hello Word";
  7.         for(i=0;i<8*strlen(word);i++)
  8.         printf("%d",0 != (word[i/8] & 1 << (~i&7)));
  9.         printf("\n");
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement