fork download
  1. #include <stdio.h>
  2.  
  3. struct S {
  4. struct {
  5. long a;
  6. int b;
  7. };
  8. int c;
  9. };
  10.  
  11. struct S2 {
  12.  
  13. long a;
  14. int b;
  15.  
  16. int c;
  17. };
  18.  
  19. int main(void) {
  20. struct S t;
  21. struct S2 t2;
  22. printf("%d\n", sizeof(t));
  23. printf("%d\n", sizeof(t2));
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0.01s 5288KB
stdin
1
2
10
42
11
stdout
24
16