Puzzle T21


Variable Style 1: Variable Directly Contains a struct

Edit main() so that it contains the variable point which works correctly with the rest of the program.

/* 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()
{
  /* declare and initialize the variable point */
  Point 

  /* print values */
  printPoint(   );
  
  return 0;
}


Answer         Next Page         Previous Page Home