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