fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct{
  4. int x;
  5. int y;
  6. int z;
  7. }Coordinate;
  8.  
  9. int main(void) {
  10.  
  11. Coordinate a = {1,2,3};
  12. Coordinate *p = &a;
  13.  
  14. p -> x ++;
  15. p -> y ++;
  16. p -> z ++;
  17.  
  18. printf("%d\n",a.x);
  19. printf("%d\n",a.y);
  20. printf("%d\n",a.z);
  21.  
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 5328KB
stdin
Standard input is empty
stdout
2
3
4