#include struct a { int x,y; unsigned int a:1, b:1, c:1, d:1; }; unsigned char conv(unsigned char byte) { // unsigned char byte = in; return (byte >> 7) & 1 | (byte >> 5) & 2 | (byte >> 3) & 4 | (byte >> 1) & 8 | (byte << 1) & 16 | (byte << 3) & 32 | (byte << 5) & 64 | (byte << 7) & 128; } int main() { struct a a; int i; char *x; memset(&a, 0, sizeof(struct a)); a.a = 0; a.b = 1; a.c = 0; a.d = 0; x = (char*)&a; for(i=0; i> j) & 1); printf("\n"); } }