fork download
  1. #include<stdio.h>
  2.  
  3. typedef struct s_{
  4. int a;
  5. int b;
  6. }s;
  7.  
  8. typedef struct t_{
  9. int c;
  10. int d;
  11. }t;
  12.  
  13. typedef struct st_{
  14. s s1;
  15. t t1;
  16. }st;
  17.  
  18. #define ST_ALLOC {{20,20},{10,10}}
  19.  
  20. int main(){
  21. st str[2] = ST_ALLOC;
  22. //str[0] = ST_ALLOC;
  23. //str[1] = ST_ALLOC;
  24.  
  25. printf("\n st.s1.a : %d st.t1.d : %d \n",str[1].s1.a,str[1].t1.d);
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
 st.s1.a : 10 st.t1.d : 0