Possible Duplicate:
Is there a printf converter to print in binary format?
Consider this small C application
int main () {
int bits = 100 >> 3;
printf("bits => %d", bits);
return 0;
}
How can I print the bits
variable so I can see it as a binary value (with the bits clearly shifted), e.g. 00001100
?
I'm also learning, so feel free to correct any terminology.