Code:
int main(int argc, char **argv)
{
int n = atoi(argv[1]);
while(n>0){
c[12]=n%2;
printf("%d", c[12]);
n = quotient(n);
}
printf("\n");
printf("%d", c[12]);
return 0;
}
c is never defined in thie code you've given. Furthermore, c[12] is one single cell in that array. You're using the same exact variable over and over. I'm assuming you want to move through the array? As such, replace 12 with a counter variable instead. Increment or decrement it as needed.
Search the board. Converting from binary to decimal and back again is a common problem / post here.
Quzah.