From: hackbard Date: Thu, 13 Mar 2003 13:42:32 +0000 (+0000) Subject: added string2bin X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=9ccdc1ce1bc0c032cece32a2caf2011b9bca6dea;p=my-code%2Fbeginners.git added string2bin --- diff --git a/string2bin.c b/string2bin.c new file mode 100644 index 0000000..3d8f928 --- /dev/null +++ b/string2bin.c @@ -0,0 +1,15 @@ +#include +#include + +int main(int argc, char **argv) { + unsigned char *s=argv[1]; + int i,j; + for(j=0;j=0;i--) { + printf("%s%d%s",i==7?"|":"", + s[j]&(1<