hi i got a code where i have to find the binary equivalent of the string
is ther any function that will convert from char to bainary ..or how would i solve this problem
hi i got a code where i have to find the binary equivalent of the string
is ther any function that will convert from char to bainary ..or how would i solve this problem
Good lord. Isn't this in the FAQ yet? This is posted every week. Since this is homework, and I know it is, how about you use the search button, eh?
Quzah.
Hope is the first step on the road to disappointment.
I'm not sure but you may want to try something like this
void convert( char ch)
{
int i;
for(i=0;i<8;i++){
if( ch & (1 << i)){
printf("1");
}
else{
printf("0");
}
}
printf("\n");
return ;
}
~good monkeys, Excelent typewritters!...