G15 Answer


/* declare the Point type */
typedef struct
{
  int x, y;
} Point;

/* function to print a Point */
void printPoint( Point *p )
{
  printf("(%d, %d)\n", p->x, p->y );
}

int main(int argc, char *argv[])
{
  /* declare and initialize two Points */
  Point p1={-32,77}, p2={345, 490};

  /* print values */
  printPoint( &p1 );
  printPoint( &p2 );

  system("pause");
  return 0;
}

Comments: