fork(1) download
  1. #include <stdint.h>
  2. #include <stdio.h>
  3.  
  4. struct _sa {
  5. uint32_t w;
  6. uint8_t const a[];
  7. };
  8.  
  9. uint8_t const a[] = { 7,6,5,4,3,2,1,0 };
  10.  
  11. struct _sa const s = {
  12. .w = 8,
  13. .a = { 7,6,5,4,3,2,1,0 },
  14. };
  15.  
  16. char const b[] = "line";
  17.  
  18. int main(void)
  19. {
  20. printf("sizeof(a) = %d \n", (int)sizeof(a)); // = 8
  21. printf("sizeof(s) = %d \n", (int)sizeof(s)); // = 4
  22. printf("sizeof(b) = %d \n", (int)sizeof(b)); // = 5
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5588KB
stdin
Standard input is empty
stdout
sizeof(a) = 8 
sizeof(s) = 4 
sizeof(b) = 5