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