Function to Print the Bits of a variable.....
void prnBits(unsigned int val) { unsigned int m = 1 << sizeof(val)*8 - 1; while(m) { printf("%d\n", (val & m) && 1); m = m >> 1; } }
No comments:
Post a Comment