How to write a C Program to Convert Text String to Binary ?
Solution:
#include <stdio.h>
#include <string.h>
int main(){
int i;
char *word = "Hello Word";
for(i=0;i<8*strlen(word);i++)
printf("%d",0 != (word[i/8] & 1 << (~i&7)));
printf("\n");
}
Learn To Write A Program. Learn Programming Online. Find Programming Solutions.