here is function to print binary from decimal,you should provably use array if you want to store that but haw will you now the number of element did not figured out yet
int bin(int nmb)
{
int temp;
while(nmb)
{
temp = nmb % 2;
printf("%d\n",temp);
nmb = nmb >> 1;
}
}