I think you guy already heard of a code like this
(c & (1 << i)) ? '1' : '0';
I already stored this on an array but it gives me a wrong binary. Here's the additional code
int i;
char test[8];
for(i=7 ; i>=0; i--){
test[i] =(c &(1 << i)) ? '1' : '0';
}
int j = atoi(test);
printf("%d\n", j);
my sample was: 'I' it gave me : 100100109