fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct{
  4. int x;
  5. int y;
  6. }coordinate;
  7.  
  8. coordinate move_x(coordinate a);
  9. int main(void) {
  10. coordinate me = {1,2};
  11. coordinate new_me = move_x( me );
  12. printf("%d,%d",new_me.x,new_me.y);
  13. return 0;
  14. }
  15. coordinate move_x(coordinate a){
  16. a.x +=1;
  17. return a;
  18. }
  19.  
  20.  
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
2,2