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