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