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