Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C binary

Name: Anonymous 2007-02-06 9:43

#include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
 int main(int argc, char **argv) {
    
     int i, loop, arguments = 0;
     char c, temp, binary[8];
    
     if(argc == 1) {
         fprintf(stderr, "Usage: %s [string]\n", argv[0]);
         return 1;
     }
    
     while(++arguments < argc)
         for(i=0; i< strlen(argv[arguments]); i++) {
             c = argv[arguments][i];
             loop = -1;
            
             while(++loop-8) {
                 binary[7 - loop] = (48 + c%2);
                 c /= 2;
             }
             (i+1)%4?fputs(binary, stdout):puts(binary);
         }
    
     return 0;
 }

Name: Anonymous 2007-02-06 11:48

>>1
*bashes shitty C* ;)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List