#include void bp(char n){ /* prints chars up to value 255 (for 255, the MSB is 2^7 == 128) */ int i = 128; while (i) { printf("%c", ((n & i) == i) ? '1' : '0'); i >>= 1; } }