If you are trying to get bit representation from integer value, here is an example of how to do that. You have to check each bit manually, there is not built in utility to iterate through "bits".
#include <stdio.h>
int main(int argc, char const *argv[])
{
int numbers[] = { 28, 171, 3, 324, 66 };
int numberslength = (int) (sizeof(numbers) / sizeof(int));
// each number
for (int i = 0; i < numberslength; ++i)
{
int number = numbers[i]; // get the number
int mask = 1; // start at the beginning
for (int j = 0; j < sizeof(int) * 8; ++j)
{
// if the number has a bitwise and in that bit, 1
printf("%c", number & mask ? '1': '0');
// move the mask over to the next bit
mask <<= 1;
}
// separate outputs by newline
printf("\n");
}
return 0;
}