fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. union {
  5. struct {
  6. unsigned a: 1;
  7. unsigned b: 1;
  8. unsigned c: 30;
  9. } f1;
  10. int32_t f2;
  11. } u;
  12.  
  13. int main(void) {
  14. u.f2 = 0b00111001;
  15. printf ("%u %u", u.f1.a, u.f1.b);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 2052KB
stdin
Standard input is empty
stdout
1 0