fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. enum nums {
  5. ONE,
  6. TWO,
  7. TWENTY = 15
  8. };
  9.  
  10. struct field {
  11. uint32_t something : 4;
  12. uint32_t rest : 28;
  13. };
  14.  
  15. int main(void) {
  16.  
  17. struct field f;
  18. f.something = TWENTY;
  19.  
  20. switch (f.something) {
  21. case ONE:
  22. printf("One\n");
  23. break;
  24. case TWENTY:
  25. printf("t\n");
  26. break;
  27. }
  28. // your code goes here
  29. return 0;
  30. }
  31.  
Success #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
t