#include <stdio.h>
typedef union {
char valor;
struct {
unsigned char a : 1;
unsigned char b : 1;
unsigned char c : 1;
unsigned char d : 1;
unsigned char e : 1;
unsigned char f : 1;
unsigned char g : 1;
unsigned char : 1;
} bits;
} Tipo;
int main(void) {
Tipo x = { .valor = 87 };
printf("%d %d %d %d %d %d %d", x.
bits.
a, x.
bits.
b, x.
bits.
c, x.
bits.
d, x.
bits.
e, x.
bits.
f, x.
bits.
g); }
//https://pt.stackoverflow.com/q/178733/101
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp0eXBlZGVmIHVuaW9uIHsKICAgIGNoYXIgdmFsb3I7CiAgICBzdHJ1Y3QgewogICAgICAgIHVuc2lnbmVkIGNoYXIgYSA6IDE7CiAgICAgICAgdW5zaWduZWQgY2hhciBiIDogMTsKICAgICAgICB1bnNpZ25lZCBjaGFyIGMgOiAxOwogICAgICAgIHVuc2lnbmVkIGNoYXIgZCA6IDE7CiAgICAgICAgdW5zaWduZWQgY2hhciBlIDogMTsKICAgICAgICB1bnNpZ25lZCBjaGFyIGYgOiAxOwogICAgICAgIHVuc2lnbmVkIGNoYXIgZyA6IDE7CiAgICAgICAgdW5zaWduZWQgY2hhciA6IDE7CiAgICB9IGJpdHM7Cn0gVGlwbzsKCmludCBtYWluKHZvaWQpIHsKCVRpcG8geCA9IHsgLnZhbG9yID0gODcgfTsKCXByaW50ZigiJWQgJWQgJWQgJWQgJWQgJWQgJWQiLCB4LmJpdHMuYSwgeC5iaXRzLmIsIHguYml0cy5jLCB4LmJpdHMuZCwgeC5iaXRzLmUsIHguYml0cy5mLCB4LmJpdHMuZyk7Cn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzE3ODczMy8xMDE=