fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct {
  4. unsigned char a : 1;
  5. unsigned char b : 7;
  6. } Tipo;
  7.  
  8. int main(void) {
  9. Tipo x = { .a = 1, .b = 64 };
  10. printf("%d e %d\n", x.a, x.b);
  11. printf("%zd\n", sizeof(Tipo));
  12. }
  13.  
  14. //http://pt.stackoverflow.com/q/178733/101
Success #stdin #stdout 0s 4584KB
stdin
Standard input is empty
stdout
1 e 64
1