fork download
  1.  
  2. struct s {
  3. int a[3];
  4. };
  5.  
  6. int main(void)
  7. {
  8. struct s x = {{10, 20, 30}};
  9. struct s y = {{40, 50, 60}};
  10.  
  11.  
  12. printf("x.a[1] = %d\n", x.a[1]);
  13.  
  14. x = y;
  15. printf("x.a[1] = %d\n", x.a[1]);
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
x.a[1] = 20
x.a[1] = 50